Cod sursa(job #25397)

Utilizator ProtomanAndrei Purice Protoman Data 4 martie 2007 12:27:09
Problema Zero 2 Scor 7
Compilator fpc Status done
Runda preONI 2007, Runda 3, Clasa a 9-a si gimnaziu Marime 0.41 kb
var f1,f2:text; i,n,a,b:longint;
begin
        assign(f1,'zero2.in');
        reset(f1);
        assign(f2,'zero2.out');
        rewrite(f2);
        for i:=1 to 10 do begin
                read(f1,a,b);
                if a=b then writeln(f2,1);
                if a>b then writeln(f2,a-b+1);
                if a<b then writeln(f2,0);
                end;
        close(f1);
        close(f2);
end.