"Given a number N, find the numbers below N that are divisible by 3 or 5?" Is there any faster way to solve it without using bruteforce?

Revision en2, by Farnan.PUST, 2016-11-25 23:26:15

I can do it in O(N) time. but can it be more faster?

Tags number theory, factorization, divisors

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English Farnan.PUST 2016-11-25 23:26:15 13
en1 English Farnan.PUST 2016-11-25 23:24:47 178 Initial revision (published)