题解 | #等差数列#
等差数列
http://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
#这道题 只要知道等差数列求和公式的应该可以的
while True:
try:n = int(input())
d = 3
sum1 = n*2 + n*(n-1)*d/2
print(int(sum1))
except:
break
等差数列
http://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
相关推荐