#987. [基础]最大公约数-弱数据

    ID: 987 Type: Default 1000ms 256MiB Tried: 8 Accepted: 4 Difficulty: 10 Uploaded By: Tags>其他数学基础循环最大公约数最大公因子公约数公因子

[基础]最大公约数-弱数据

No submission language available for this problem.

Background

Special for beginners, ^_^

Description

若存在一个整数 c,使得 a % c == 0 且 b % c == 0,则称 c 为 a 与 b 的公因子(公约数)

👉最大公约数

Format

Input

一行两个整数 a, b ( 1 ≤ a, b ≤ 10000)

Output

一行一个整数,表示 a 与 b 的最大公约数。

Samples

25 10
5

Limitation

1s, 1024KiB for each test case.