XJTU_Python_Problems/codes/7.py

5 lines
74 B
Python

n = int(input())
sum = 0
for i in range(n):
sum += (i+1)**2
print(sum)