(July 3, 2016 at 1:52 am)SteelCurtain Wrote: I'm working on #12 right now.
I'm on a slow shitty computer at work using Python and IDLE now. The summation of primes problem was too much for the online shells, they time out after like 5 seconds, the stingy bastards. Hard to sum all of the primes below 2,000,000 in 5 seconds with an online shell.
Now I am finding all of the divisors in triangle numbers, finding the first triangle number with more than 500 divisors. The code was easy, but it's been running for quite a time. I've tried to make it as economical as possible, but I don't care to think too hard about it.
That's what I mean by hacky: maybe not the most efficient code, and that's why this is good practice. I am trying to loop as few times as possible when having nested loops running two million times.
Can I give you a hint on how to deal with primes in the case of very large numbers?