|
|
вернуться в форумHere is my code: program Project2; {$APPTYPE CONSOLE} uses SysUtils; var n,max,i,sum,a:integer; begin max:=0; sum:=0; readln(n); for i:=1 to n do begin readln(a); sum:=sum+a; if sum>max then max:=sum; end; writeln(max); end. I've tested it. It is allright. But i get WA!!! Why? because you're trying to make set from i = 0 to all of j. But answer may differ. |
|
|