Update formatting
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
---
|
||||
title: lcm
|
||||
tags: math,list,intermediate
|
||||
title: lcm
|
||||
tags: math,list,intermediate
|
||||
firstSeen: 2018-01-08T22:30:17+02:00
|
||||
lastUpdated: 2020-11-02T19:31:15+02:00
|
||||
---
|
||||
|
||||
Returns the least common multiple of a list of numbers.
|
||||
|
||||
- Use `functools.reduce()`, `math.gcd()` and `lcm(x,y) = x * y / gcd(x,y)` over the given list.
|
||||
- Use `functools.reduce()`, `math.gcd()` and `lcm(x, y) = x * y / gcd(x, y)` over the given list.
|
||||
|
||||
```py
|
||||
from functools import reduce
|
||||
|
||||
Reference in New Issue
Block a user