Problem10389--基础函数使用 —— __gcd

10389: 基础函数使用 —— __gcd

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 512 MiB

Description

Syntax for C++14 :

Library: 'algorithm'

__gcd(m, n)

Parameter :m, n

Return Value :0 if both m and n are zero, else gcd of m and n.

Syntax for C++17 :

Library:'numeric'

gcd(m, n)

Parameter :m, n

Return Value :0 if both m and n are zero, else gcd of m and n.

Input

一行两个整数 $n,m\ (-10^9 \leq n,m \leq 10^9)$。

Output

一行一个整数,表示答案。

Sample 1 Input

6 20

Sample 1 Output

2

Sample 2 Input

0 15

Sample 2 Output

15

Sample 3 Input

0 0

Sample 3 Output

0

-8 800

-8

Source/Category