标签:while strip not print break input += rip bre
等差数列 2,5,8,11,14。。。。
while True:
line = input().strip()
if not line:
break
line2 = int(line)
num = 2
sumnum = 0
while line2 > 0:
sumnum = num + sumnum
num += 3
line2 -= 1
print (sumnum)
标签:while strip not print break input += rip bre
原文地址:https://www.cnblogs.com/zhangyanshared/p/13292649.html