gcd( a -> b)

View as PDF

Points: 100 Time limit: 1.0s Memory limit: 640M Input: stdin Output: stdout

Bạn được cho 2 số nguyên \(a, b\).

Hãy tính ước chung lớn nhất của các số từ \(a\) đến \(b\).

Input

  • \(a, b (1 \leq a \leq b \leq 10^{100})\)

Output

  • Ước chung lớn nhất \((a, a + 1, ... , b)\)

Example

Test 1

Input
2 4
Output
1
Note

Ước chung lơn nhất của \(3\) số \((2, 3, 4)\)\(1\)


Comments

There are no comments at the moment.