시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 490 | 363 | 316 | 77.833% |
The greatest common divisor (GCD) of two integers is the largest positive integer that divides the numbers without a remainder. For example, GCD of 8 and 12 is 4. You will write a program that finds the gcd of two positive integers.
The first line of input will be a positive integer, n, indicating the number of problem sets. Each problem set consist of two positive integers, separated by one or more spaces. There are no blank lines in the input.
For each problem set print the gcd of the two positive integers. Print each gcd on a separate line.
3 54 24 33 22 41 103
6 11 1