Anonymous user
Practical numbers: Difference between revisions
→{{Header|Python}}: Sub headers
(→{{Header|Python}}: Alternate) |
(→{{Header|Python}}: Sub headers) |
||
Line 19:
=={{Header|Python}}==
===Python: Straight forward implementation===
<lang python>from itertools import chain, cycle, accumulate, combinations
from typing import List, Tuple
Line 82 ⟶ 84:
STRETCH GOAL: 666 is Practical.</pre>
This version has an optimisation that might prove ``much`` faster in some cases but slower than the above in others.
|