Accepted
C 代码
#include <stdio.h>
int main() {
int a, b, t, n;
scanf("%d", &n);
for (int i = 0;i<n;i++) {
scanf("%d %d", &a, &b);
while (b != 0) {
t = a % b;
a = b;
b = t;
}
printf("%d\n", a);
}
return 0;
}