ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1068. Sum

Помогите пожалуйста, разве это неверное решение (PascalABC)
Posted by Ahmet 19 Oct 2023 22:38
var N: integer;
begin
readln(n);
if (abs(n)>10000) then writeln('Îøèáêà ââîäà') else
if N>=0 then writeln(((1+n)*n)/2)
else writeln(((1+n)*(abs(n)+2))/2);
end.