Now, contest is over i want to ask this question from the day i saw this problem. The constraints limit on a and b is from 1 to 10^9. And i solve this problem for first 1000 values that is 1 to 10^3 by simple counting number of primes form a to b with given properties.
Can this problem be solved for the given constrainst that is
1 1 1000000000
If yes, how and If, no then what the organisers of ByteCode 2013 are thinking.