分數可以約分就先約分,輸入的地方或是運算的過程都要
範例輸入
1 1
2 2
60 60
範例輸出
1
$$\left\{\begin{matrix} f(n) = 1 / 1 & \text{, if } &n = 1\\ f(n) = 1 + f(n/2) & \text{, if } &n \equiv 0 \mod 2 \\ f(n) = 1 / f(n-1) & \text{, if } &n \equiv 1 \mod 2 \end{matrix}\right.$$