PaycomOA #2
Q2. Pseudo Code — Mystery Algorithm
简单概念题可在线判题
考点(AI 标注)位运算
The original problem gives pseudocode for repeated subtraction and asks for the result when a=2437, b=875. This site generalizes the same algorithm to read any two positive integers and output x=y at the point where the algorithm terminates.
输入格式
One line with two positive integers a, b. Ranges added by this site: 1≤a,b≤10^9.
输出格式
Output the equal value that this repeated-subtraction algorithm ends with.
样例 1
输入:
2437 875
输出:
1
样例 2
输入:
12 18
输出:
6
样例 3
输入:
1 999999
输出:
1