fork download
  1. n=int(input())
  2. sum=0
  3. for i in range(1,n+1): #for i in range(1,n+1) => 1~n
  4. sum=sum+i^2
  5. print(sum)
Success #stdin #stdout 0.12s 14240KB
stdin
100
stdout
5054