题解 | #等差数列#
等差数列
https://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
等差数列求和公式
Python实现
n = int(input())
an = 3 * n - 1
s = (n / 2) * (2 + an)
print(int(s))
等差数列
https://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
等差数列求和公式
Python实现
n = int(input())
an = 3 * n - 1
s = (n / 2) * (2 + an)
print(int(s))
相关推荐