Sum of first n cubes: Difference between revisions
→Python :: Functional: Inlined call to itertools.accumulate
m (Rust - simplified code) |
(→Python :: Functional: Inlined call to itertools.accumulate) |
||
Line 1,389:
<lang python>'''Sum of first N cubes'''
from itertools import accumulate
Line 1,399:
return a + (x ** 3)
return
Line 1,413 ⟶ 1,411:
])
)
|