Var i,j,k,s1,s2,s3: longint;
Begin
For i:=1 to 1000 do s1:=s1+i; writeln('a) S1= ',s1);
For i:=0 to 998 do s2:=s2+2*i+1; writeln('b) S2= ',s2);
For i:=0 to 999 do s3:=s3+2*i+2; writeln('c) S3= ',s3);
Writeln('d) Cho Ga ');
For i:=0 to 43 do
For j:=0 to 50 do
If (i+j=50) and (i*4+j*2=170) then writeln(i:6,j:6);
Writeln('e) ');
For i:=1 to 9 do
For j:=0 to 9 do
For k:=0 to 9 do
If i*i*i+j*j*j+k*k*k=i*100+j*10+k then write(i:5,j,k);
Readln;
End.