Task

The objective is to write a function that finds the sum of all positive multiples of 3 or 5 below n.

Show output for n = 1000.

This is is the same as Project Euler problem 1.

Extra credit: do this efficiently for n = 1e20 or higher.




[ Sm Sn lm 1 - d ln % - d sm ln / ln lm + * 0k 2 / Ss Lm sx Ln sx Ls ]sm
 
[ d d d 3 r lmx r 5 r lmx + r 15 r lmx - ]ss
 
[ 27 P 91 P 65 P 27 P 91 P 50 P 50 P 67 P ]su
 
[ ll p lsx lux p ll 10 * d sl 1000000000000000000000 >d]sd
 
1 sl ldx