Pagini recente » Borderou de evaluare (job #1970248) | Cod sursa (job #2091353) | Cod sursa (job #1105819) | Cod sursa (job #1621913) | Cod sursa (job #612324)
Cod sursa(job #612324)
program Nim;
var t,n,x,S:longint;
i,j:longint;
begin
assign(input,'nim.in');
reset(input);
assign(output,'nim.out');
rewrite(output);
readln(t);
for i:=1 to t do
begin
readln(n);
S:=0;
for j:=1 to n do
begin
read(x);
S:=S xor x;
end;
if S>0 then writeln('DA')
else writeln('NU');
readln;
end;
close(input);
close(output);
end.