#t323. 求最大公约数(gcd)

求最大公约数(gcd)

Background

Special for beginners, ^_^

Greatest Common Divisor (gcd)

Problem Description

Use a recursive method to compute the greatest common divisor of two numbers mm and nn (m>0,n>0m > 0, n > 0).

$$gcd(a,b)= \begin{cases} a, &b=0 \\ gcd(b, a\%b), &b\neq 0 \end{cases}$$

Input Format

Two numbers: the values of mm and nn.

Output Format

Output the greatest common divisor, in the format shown in the sample, with no spaces in between.

Note: the output gcd=2 must be printed exactly as shown — the judge compares it character by character, so do not change gcd or add/remove spaces.

Sample Input

8 6

Sample Output

gcd=2

Constraints

1s, 1024KiB for each test case.