#24645: C++AC


rayhsu1216 (108-34許洋睿)

School : 臺北市私立延平高級中學
ID : 128874
IP address : [203.72.178.2]
Last Login :
2023-07-21 13:12:01
a111. 12149 - Feynman -- UVa12149 | From: [111.235.252.96] | Post Date : 2021-03-12 13:28

 

long long b,s;

while(cin>>b){

s=0;

if(b==0)break;

for(int i=1;i<=b;i++)s+=i*i;

cout<<s<<endl

 

 
ZeroJudge Forum