Partition function P: Difference between revisions

Content added Content deleted
(Added 11l)
Line 64: Line 64:


print(‘Partitions: ’(0.<15).map(x -> partitions(x)))
print(‘Partitions: ’(0.<15).map(x -> partitions(x)))

print(partitions(6666))</lang>
V start = time:perf_counter()
print(partitions(6666))
print(time:perf_counter() - start)</lang>


{{out}}
{{out}}
Line 70: Line 73:
Partitions: [1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135]
Partitions: [1, 1, 2, 3, 5, 7, 11, 15, 22, 30, 42, 56, 77, 101, 135]
193655306161707661080005073394486091998480950338405932486880600467114423441282418165863
193655306161707661080005073394486091998480950338405932486880600467114423441282418165863
0.598528
</pre>
</pre>