19 lines
155 B
Plaintext
19 lines
155 B
Plaintext
|
import log
|
||
|
|
||
|
main() {
|
||
|
log.number(gcd(1071, 462))
|
||
|
}
|
||
|
|
||
|
gcd(a, b) {
|
||
|
loop {
|
||
|
if a == b {
|
||
|
return a
|
||
|
}
|
||
|
|
||
|
if a > b {
|
||
|
a -= b
|
||
|
} else {
|
||
|
b -= a
|
||
|
}
|
||
|
}
|
||
|
}
|