16 lines
208 B
Text
16 lines
208 B
Text
:gcd { u v -- n }
|
|
abs int swap abs int swap
|
|
|
|
[over over mod rot drop]
|
|
[dup]
|
|
while
|
|
drop
|
|
;
|
|
|
|
:lcm { m n -- n }
|
|
over over gcd rot swap div mult
|
|
;
|
|
|
|
12 18 lcm print nl { 36 }
|
|
|
|
"End " input
|