3 lines
90 B
FSharp
3 lines
90 B
FSharp
let rec gcd x y = if y = 0 then abs x else gcd y (x % y)
|
|
|
|
let lcm x y = x * y / (gcd x y)
|