Welcome   HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online
Home
FAQs
Problem Set
Practices
Online Contests
Major Exercises
OI Special
Judgement
Submit
Online Status
User Ranklist
Users
Register new
Login
Web Links
Hunan Normal University
College of Mathematics and Computer Science
最大公约数
Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:32768KB
Total submit users: 373, Accepted users: 322
Problem 10030 : No special judgement
Problem description
  输入两个整数a,b(1<=a,b<=100000000),请编写程序求出他们的最大公约数。

Input
  第一个数n表示测试数据的个数,接下来的n行每行有两个整数a b,用空格隔开

Output
  输出n行,每行输出对应a,b的最大公约数

Sample Input
3
12 8
25 10
21 63
Sample Output
4
5
21
Problem Source
  CSU 1st Contest

Submit   Discuss   Judge Status  Problems  Ranklist 

HUNAN NORMAL UNIVERSITY ACM/ICPC Judge Online, Version 2010.5.5.final.
Web visits:5880 today,10453981 total, since 2010-05-07