|
|
back to boardWhat`s wrong?? First test Var n,i,s,a,g:integer; b:array [1..1000000] of integer; Begin ReadLn(n); s:=0; for i:=1 to n do ReadLn(b[i]); for i:=1 to n do begin a:=b[i]+b[i+1]+b[i+2]; if a>s then begin s:=a; g:=i+1; end; end; WriteLn(s,' ', g); End.
|
|
|