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 Information Science and Engineering
次大公约数
Time Limit: 15000ms, Special Time Limit:25000ms, Memory Limit:32768KB
Total submit users: 40, Accepted users: 39
Problem 11623 : No special judgement
Problem description
  给2个1000以内的正整数,求其次大公约数

Input
  输入有若干行,每行2个数,用1个空格分隔。

Output
  对每个输入输出一行为其答案。如果两个数是互质的,则输出0。

Sample Input
8 12
8 15
Sample Output
2
0
Judge Tips
  备注:不要想的太复杂,这只是期末考试。

Problem Source
  HUNNU Contest 

Submit   Discuss   Judge Status  Problems  Ranklist 

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