真题模拟赛第四场|Ant|2023.04.04算法岗笔试
- Status
- Done
- Rule
- IOI
- Problem
- 3
- Start at
- 2023-4-14 19:00
- End at
- 2023-4-14 20:20
- Duration
- 1.3 hour(s)
- Host
- Partic.
- 81
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
小红是一个喜欢研究数学问题的年轻人。最近,他对等差数列的性质产生了浓厚的兴趣。他特别关注等差数列的和,想找到一种方法来计算出等差数列的和。
他经过一段时间的研究后,发现了一个有趣的问题:对于任意给定的整数 n,能否找到一个等差数列,使得它的和等于 n2 呢?
输入为一个整数 n(1≤n≤108) 。
输出该等差数列的首项,公差,项数。(这三个数不能超过 1010 )
输入
3
输出
1 2 3