15 lines
156 B
Plaintext
15 lines
156 B
Plaintext
import log
|
|
|
|
main() {
|
|
log.number(gcd(1071, 462))
|
|
}
|
|
|
|
gcd(a, b) {
|
|
loop {
|
|
switch {
|
|
a == b { return a }
|
|
a > b { a -= b }
|
|
_ { b -= a }
|
|
}
|
|
}
|
|
} |