ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 2070. Interesting Numbers

Getting TLE test 27
Posted by Shubham 26 Oct 2017 23:09
Used Sieve to generate primes till 10^6, and then used those primes to generate larger primes.
counted all such numbers satisfying  L <= p^(q-1) <=R where p & q are primes (q>2). Subtracted it from R-L+1

How to optimize?