|
|
back to boardWr.Answ 3 wtf? what`s wrong? program asd; var n,k,i:byte; r:word; a:array[1..100] of byte; BEGIN r:=0; ReadLn(k,n); for i:=1 to n do begin Read(a[i]); if (r+a[i]-k)>=0 then r:=r+a[i]-k else r:=0; end; WriteLn(r); END. Re: Wr.Answ 3 Hi array must be [1..101] because you need to put the latest integer into this cell Re: Wr.Answ 3 Posted by Logan`~ 14 Sep 2018 20:33 попробуйте 5 5 0 0 0 0 0 |
|
|