OpenJudge - 08:Greatest Common Divisor
08:Greatest Common Divisor
总时间限制:
1000ms
内存限制:
65536kB
描述
Given A and B. Find the greatest D which is a common divisor of both A and B.
给定A和B。找到A和B的最大公约数D。
输入
Two positive integers A and B (A,B <= 10000).
两个不超过10000地正整数A和B。
输出
One integer D.
一个整数D。
样例输入
18 24
样例输出
6