2024-08-05 18:47:24 +02:00

15 lines
171 B
Plaintext

import log
main() {
log.number(gcd(1071, 462))
}
gcd(a Int, b Int) -> Int {
loop {
switch {
a == b { return a }
a > b { a -= b }
_ { b -= a }
}
}
}