7 lines
100 B
Text
7 lines
100 B
Text
fn gcd(m: i32, n: i32) -> i32 {
|
|
if m == 0 {
|
|
n.abs()
|
|
} else {
|
|
gcd(n % m, m)
|
|
}
|
|
}
|