|
|
вернуться в форумWhy WA? I can't understand! Послано Dr.Dro 14 июн 2007 20:53 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? Re: Why WA? I can't understand! Послано Михаил 18 июл 2008 03:16 because you're trying to make set from i = 0 to all of j. But answer may differ. |
|
|