But still, you are essentially correct. After some wrapper logic, the problem really does boil down to being able to efficiently calculate the sum of the digits from 1 to n for any positive integer n.
In reply to Re (tilly) 3: Finding sum of all digits from 1 to 1 million.
by tilly
in thread Finding sum of all digits from 1 to 1 million.
by vladb
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |