|
|
back to boardwa2 pascal Posted by Dior 8 Jun 2014 12:12 var n,r,c,i,k:integer; begin readln(k); write(' '); read(n); writeln; r:=0; for i:=1 to n do begin read(c); write(' '); if r<0 then r:=0; r:=r+c-k; end; if r<0 then writeln('0') else writeln(r); end. |
|
|