You are viewing a single comment's thread. Return to all comments →
I found a more efficient implementation here for those performance geeks. (Prime factorization is even better, but probably overkill.)
Note: Linked answer is slightly wrong, looks like they forgot to add the number itself to the sum. But you get the idea.
Seems like cookies are disabled on this browser, please enable them to open this website
Day 19: Interfaces
You are viewing a single comment's thread. Return to all comments →
I found a more efficient implementation here for those performance geeks. (Prime factorization is even better, but probably overkill.)
Note: Linked answer is slightly wrong, looks like they forgot to add the number itself to the sum. But you get the idea.