题解 | #等差数列#
等差数列
http://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
while True:
try:
n = int(input())
a1=2
d= 3
s = n*a1+n*(n-1)*d/2
print(int(s))
except:
break
等差数列
http://www.nowcoder.com/practice/f792cb014ed0474fb8f53389e7d9c07f
while True:
try:
n = int(input())
a1=2
d= 3
s = n*a1+n*(n-1)*d/2
print(int(s))
except:
break
相关推荐