Program lol;
Var x, sum, a, b:integer;
begin
readln(x);
a := round(int(sqrt(x))) + 1;
b := round(x*x);
for var i := a to b do
sum := sum + i;
writeln(sum);
end.
Объяснение:
Program lol;
Var x, sum, a, b:integer;
begin
readln(x);
a := round(int(sqrt(x))) + 1;
b := round(x*x);
for var i := a to b do
sum := sum + i;
writeln(sum);
end.
Объяснение: