Pagini recente » Cod sursa (job #1243097) | Cod sursa (job #36211) | Cod sursa (job #741114) | Diferente pentru problema/smooth2 intre reviziile 6 si 5 | Cod sursa (job #170261)
Cod sursa(job #170261)
var r,x,y:longint;
f,g:text;
t,i:longint;
function diviz(a,b:longint):longint;
begin
if b=0 then diviz:=a
else diviz:=diviz(b,a mod b);
end;
begin
assign(f,'euclid2.in');reset(f);
assign(g,'euclid2.out');rewrite(g);
readln(f,t);
for i:=1 to t do
begin
readln(f,x,y);
writeln(g,diviz(x,y));
end;
close(f);
close(g);
end.