A-M baby
This commit is contained in:
parent
764da6cbbb
commit
db842d013d
19005 changed files with 197040 additions and 7 deletions
|
|
@ -0,0 +1,2 @@
|
|||
def gcd(a: Int, b: Int):Int=if (b==0) a.abs else gcd(b, a%b)
|
||||
def lcm(a: Int, b: Int)=(a*b).abs/gcd(a,b)
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
lcm(12, 18) // 36
|
||||
lcm( 2, 0) // 0
|
||||
lcm(-6, 14) // 42
|
||||
Loading…
Add table
Add a link
Reference in a new issue