var
k,sum,N:integer;
begin
k:=1;
sum:=0;
readln(N);
while sum<N do begin
sum:=sum+k;
inc(k);
end;
writeln(sum);
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var
k,sum,N:integer;
begin
k:=1;
sum:=0;
readln(N);
while sum<N do begin
sum:=sum+k;
inc(k);
end;
writeln(sum);
end.