曹文信息在线OJ
Home
ProblemSet
Source/Category
Contest
Status
Ranklist
F.A.Qs
Login
Register
1379: 中级班第一课——找公约数
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:223
Solved:6
Submit
Submit Record
Statistics
Web Board
ShowOff!
Description
如果有一个数既是
a
的约数,又是
b
的约数,我们就称该数为
a
和
b
的公约数。编程序找出
a
和
b
的所有公约数。
Input
两个整数
a
和
b,
用空格隔开。
Output
所有的公约数,每个公约数占一行。
Sample Input
Copy
10 35
Sample Output
Copy
1 5
Source/Category
中级A