Welcome, guest! Login / Register - Why register?
Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)

Paste

Pasted by Анатолий ( 15 years ago )
program abc;
var
x, i, m, n, z, k : longint;
mas : array[1..101] of longint;
begin
readln(x);
for i:=1 to x do
readln(mas[i]);

m:=100;
n:=100;
 
for i:=1 to x do begin

m:=abs(m+mas[i]);
 if m<n then n:=m;
 end;
 writeln(n);
 end.

 

Revise this Paste

Your Name: Code Language: