Cod sursa(job #125060)
Utilizator | Data | 20 ianuarie 2008 11:08:48 | |
---|---|---|---|
Problema | Fructe | Scor | 100 |
Compilator | fpc | Status | done |
Runda | preONI 2008, Runda 3, Clasele 5-8 | Marime | 0.38 kb |
program magic_tree;
var t, i : longint;
p,b : longint;
fin,fout:text;
begin
assign(fin,'fructe.in'); reset(fin);
assign(fout,'fructe.out'); rewrite(fout);
readln(fin, t);
for i := 1 to t do
begin
readln(fin,p,b);
p:=0;
if b mod 2 =0 then
writeln (fout,0)
else writeln(fout,1);
end;
close(fout);
close(fin);
end.