Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
>>> import fractions
|
||||
>>> def lcm(a,b): return abs(a * b) / fractions.gcd(a,b) if a and b else 0
|
||||
|
||||
>>> lcm(12, 18)
|
||||
36
|
||||
>>> lcm(-6, 14)
|
||||
42
|
||||
>>> assert lcm(0, 2) == lcm(2, 0) == 0
|
||||
>>>
|
||||
Loading…
Add table
Add a link
Reference in a new issue