Anonymous user
Sum multiples of 3 and 5: Difference between revisions
→{{header|Python}}: More clear.
(→{{header|Perl 6}}: Add Python. (three ways).) |
(→{{header|Python}}: More clear.) |
||
Line 47:
divs = [(n-1) // c for c in consts]
sums = [d*c*(1+d)/2 for d,c in zip(divs, consts)]
return
#test
|