題組內容
2. 請寫出以下問題的運算結果,請寫出計算過程:(25 分)
(b)請用以下 gcd 函數運算 gcd(10, 42) 的結果,請寫出計算過程:(15 分)
\[
\text{gcd}(x, y) =
\begin{cases}
x & \text{if } y=0 \\
\text{gcd}(y, x \pmod y) & \text{otherwise}
\end{cases}
\]
2. 請寫出以下問題的運算結果,請寫出計算過程:(25 分)
(b)請用以下 gcd 函數運算 gcd(10, 42) 的結果,請寫出計算過程:(15 分)
\[
\text{gcd}(x, y) =
\begin{cases}
x & \text{if } y=0 \\
\text{gcd}(y, x \pmod y) & \text{otherwise}
\end{cases}
\]