题解 | #等差数列#
等差数列
http://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
由于Python不能够导入模块,因此只能够自己用最基本的方法来构造数列
while True:
try:
num = int(input().strip())
res = 0
for i in range(num):
v = 2 + 3 * i
res += v
print(res)
except:
break