Lucky Numbers AgainProblem code: RUBIX5 |
A lucky number N is defined as a number which has only two factors, both of them prime and the absolute difference between the two factors is not more than 50. Given two integers, a and b, find the total lucky numbers in the range a to b (inclusive).
Input
1.The first input will be T, the number of test-cases. T <= 2000. T lines follow, one for each test case.
2.For each test case there are two integers a and b on each line. 1 <= a <= b <= 100000
Output
For every test case, print the number of lucky numbers from a to b (inclusive).
Example
Input: 1 1 20
Output: 4
Explanation From 1 to 20, there are four lucky numbers, 6,10, 14, and 15.
| Author: | csirubix |
| Date Added: | 13-02-2010 |
| Time Limit: | 1 sec |
| Source Limit: | 50000 Bytes |
| Languages: | ADA, ASM, BASH, BF, C, C99 strict, CAML, CLOJ, CLPS, CPP 4.0.0-8, CPP 4.3.2, CS2, D, ERL, F#, FORT, GO, HASK, ICK, ICON, JAR, JAVA, JS, LISP clisp, LISP sbcl, LUA, NEM, NICE, PAS fpc, PAS gpc, PERL, PERL6, PHP, PIKE, PRLG, PYTH, PYTH 3.1.2, RUBY, SCALA, SCM guile, SCM qobi, ST, TEXT, WSPC |
Comments

Fetching successful submissions

Please Note: A lucky number
Please Note: A lucky number has only two prime and distinct factors.
Do you mean to say that the
Do you mean to say that the absolute difference of the prime factors need not be less than or equal to 50?
@Balajiganapathi: The
@Balajiganapathi: The absolute difference should be less than or equal to 50.
This problem has been rejudged.
On the All Submissions age
On the All Submissions age for this problem, it shows that my solution passed. However, neither have I got a mail nor the scoreboard has been updated.
Could you please look into the matter and inform whether I should resubmit the problem. Submission ID: 187852
same happened with me
same happened with me
same here
same here