Pagini recente » Cod sursa (job #886394) | Cod sursa (job #2941517) | Diferente pentru utilizator/nod_software intre reviziile 43 si 44 | Cod sursa (job #2666908) | Cod sursa (job #900008)
Cod sursa(job #900008)
program joc_nim;
var t,i,nrp,x,y:word;
f,g:text;
begin
assign(f,'nim.in');reset(f);
assign(g,'nim.out');rewrite(g);
readln(f,t);
while t>0 do
begin
readln(f,nrp); x:=0;
for i:=1 to nrp do begin
read(f,y);
x:=x xor y;
end;
if x>0 then writeln(g,'DA')
else writeln(g,'NU');
dec(t);
end;
close(f); close(g);
end.