Update formatting

This commit is contained in:
Isabelle Viktoria Maciohsek
2022-01-30 19:18:14 +02:00
parent c95f39e4ba
commit 2a16eb9892
6 changed files with 10 additions and 10 deletions

View File

@@ -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