题解 | #牛牛学数列4#
牛牛学数列4
http://www.nowcoder.com/practice/586b114f52034688879342ba45779081
n = int(input())
s = 0
for i in range(1,n+1):
for j in range(1, i+1):
s += j
print(s)
牛牛学数列4
http://www.nowcoder.com/practice/586b114f52034688879342ba45779081
n = int(input())
s = 0
for i in range(1,n+1):
for j in range(1, i+1):
s += j
print(s)
相关推荐