Pagini recente » Cod sursa (job #1590742) | Cod sursa (job #603289) | Cod sursa (job #1156886) | Cod sursa (job #147109) | Cod sursa (job #45494)
Cod sursa(job #45494)
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,'Narghy')
else writeln(g,'Fumeanu');
end;
close(g);
close(f);
end.