python 等差数列求和,简单数学公式
等差数列
http://www.nowcoder.com/questionTerminal/f792cb014ed0474fb8f53389e7d9c07f
if name == 'main':
while True:
try:
n = input()
if n> 0:
print n(3n+1)/2
else:
print -1
except:
break