#K89447. Euclidean Algorithm: Compute the GCD
Euclidean Algorithm: Compute the GCD
Euclidean Algorithm: Compute the GCD
Given two non-negative integers \(m\) and \(n\), your task is to compute their greatest common divisor (GCD) using the Euclidean Algorithm. The GCD is defined as the largest positive integer that divides both numbers without leaving a remainder. Formally, the greatest common divisor is denoted as \(\gcd(m, n)\) and can be computed using the iterative method:
\[ \begin{aligned} \gcd(m, n) &= \gcd(n, m \bmod n) \\ \gcd(m, 0) &= m \end{aligned} \]
Implement the algorithm to output the GCD for given input values.
inputFormat
The input consists of two non-negative integers \(m\) and \(n\) separated by whitespace. These values are provided in a single line through standard input (stdin).
outputFormat
Output a single integer representing \(\gcd(m, n)\), printed to standard output (stdout).
## sample56 98
14
</p>