VGCD - The Very Greatest Common Divisor
题目描述
Given two integers a and b find their greatest common divisor.
输入输出格式
输入格式
The first line of the input file contains number 0 < n < 1000 the amount of tests. The description of n test cases follow. The description of a test case consists of two lines. The first line contains integer a (0 < a < 10^12540), the second – integer b (0 < b < 10^12540). It is also known that all the numbers in the input file are the determinants of the square matrix of the form:
![](https://cdn.luogu.com.cn/upload/vjudge_pic/SP6479/b4d2f81f41d894ea82e80518008e7e6378d3fdce.png)
输出格式
For each test case print the greatest common divisor of integers a and b on a separate line.
输入输出样例
输入样例 #1
3
2
3
3
21
6765
610
输出样例 #1
1
3
5