program Sanya2263;
var i,n,s: integer;
begin
Read(n);
For i:= 1 to n do
s:=s+sqr(i);
Write(s);
end.
var sum, n, i:integer;
sum:=0;
readln(n);
for i:=1 to n do
sum := sum + i*i;
write(sum);
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
program Sanya2263;
var i,n,s: integer;
begin
Read(n);
For i:= 1 to n do
s:=s+sqr(i);
Write(s);
end.
var sum, n, i:integer;
begin
sum:=0;
readln(n);
for i:=1 to n do
sum := sum + i*i;
write(sum);
end.