题解 | #等差数列#
等差数列
http://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
def func(a0,d,n):
an = a0 + (n - 1) * d
return (a0 + an)/2*n
while True:
try:
a = int(input())
b = func(2,3,a)
print(int(b))
except:
break