Cod sursa(job #324299)

Utilizator cristian3991Udroiu Constantin Cristian cristian3991 Data 15 iunie 2009 16:00:16
Problema Jocul Flip Scor 20
Compilator fpc Status done
Runda Arhiva de probleme Marime 0.35 kb
var s,a,m,n:longint;
    f:text;
    begin
    assign(f,'flip.in');
    reset(f);
    readln(f,m,n);
    s:=0;
    while not eof(f) do
    begin
    for n:=1 to m do
    begin
    read(f,a);
    s:=s+abs(a);
    end;
    readln(f);
    end;
    close(f);
    assign(f,'flip.out');
    rewrite(f);
    write(f,s);
    close(f);
    end.