You are viewing a single comment's thread. Return to all comments →
If you get an timeout in case 2 and 3, stop iterating and checking with modulo. You need to calculate it, otherwise it's too slow.
Project Euler #1: Multiples of 3 and 5
You are viewing a single comment's thread. Return to all comments →
If you get an timeout in case 2 and 3, stop iterating and checking with modulo. You need to calculate it, otherwise it's too slow.