n=int(input())sum=0for i in range(1,n+1): sum=sum+i^2 print(sum)
10
3 7 8 14 17 21 30 36 47 59
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!