1 条题解
-
0
Java :
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner n = new Scanner(System.in); int a = n.nextInt(); int c = 1; for (int i = 1; i <= a; i++) { int s = i * (3 * i - 1) / 2; System.out.print((c++ % 10 != 0) ? s + "\t" : s + "\n"); } } }
- 1
信息
- ID
- 2069
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者