Pagini recente » Cod sursa (job #1012361) | Cod sursa (job #2426690) | Cod sursa (job #959293) | Cod sursa (job #2105070) | Cod sursa (job #45499)
Cod sursa(job #45499)
var f,g:text;
t:byte;
n,i,j,necastig,nunu,x:word;
begin
assign(f,'bowling.in');
assign(g,'bowling.out');
rewrite(g);
reset(f);
read(f,t);
for i:=1 to t do begin
read(f,n);
necastig:=0;
nunu:=0;
for j:=1 to n do begin
read(f,x);
if x=1 then inc(nunu)
else begin
if (nunu mod 3=0) and (nunu<>0) then inc(necastig);
nunu:=0;
end;
end;
if necastig=0 then writeln(g,'Nargy')
else
if necastig mod 2 = 0 then writeln(g,'Nargy')
else writeln(g,'Fumeanu');
end;
close(g);
close(f);
end.