ENG
RUS
Timus 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
Shubham
Getting TLE test 27
// Problem
2070. Interesting Numbers
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?
© 2000–2025
Timus Online Judge Team
. All rights reserved.