Pagini recente » Cod sursa (job #1994293) | Istoria paginii runda/kikis_delivery_service/clasament | Cod sursa (job #2697532) | Cod sursa (job #1092309) | Cod sursa (job #521982)
Cod sursa(job #521982)
type tip1=0..2000000000;
tip2=0..100000;
var a,b,aux:tip1;
t:tip2;
begin
assign(input,'euclid2.in');
assign(output,'euclid2.out');
reset(input);
rewrite(output);
readln(t);
while t<>0 do
begin
readln(a,b);
while b<>0 do
begin
aux:=(a mod b);
a:=b;
b:=aux;
end;
writeln(a);
t:=t-1;
end;
close(input);
close(output);
end.