YouKn0wWho's blog

By YouKn0wWho, 5 years ago, In English

Well, one can count the number of primes less than or equal to n in (correct me if I am wrong) using Prime-counting function. You can solve this beautiful problem using the idea.

But recently I have come across following two (this and this) SPOJ problems with tag and have no idea how to solve them.

So If anyone can give me any idea about how to solve them, anyone will be appreciated respectfully. Thanks.

  • Vote: I like it
  • +38
  • Vote: I do not like it

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I found a good github project about prime-counting, maybe it can be useful to you to solve that problem (link)