MYSTERIO - Mysterious Number
Mysterious Number refers to a number which can be divisible by the number of distinct factors that it has. For instance, 1 (1 factor), 12 (6 factors) and 9 (3 factors) are Mysterious Numbers, but 7 (2 factors) or 16 (5 factors) are not.
Given two integers low and high, please calculate the number of Mysterious Numbers between low and high, inclusive.
Input
For each test case, there are two integers low and high in one line separated by spaces. 1 ≤ low ≤ high ≤ 1,000,000
Output
Print out the number of Mysterious Numbers between low and high, inclusive.
Example
Input: 1 10
10 15
Output:
4
1
hide comments
bekti galan prasetyo:
2013-03-30 10:59:38
any annoying testcase? |
|
Muh. Aunorafiq Musa:
2013-03-30 06:54:16
when the program will stop if there is no input for test case? |
|
[Trichromatic] XilinX:
2013-03-14 02:18:34
Constraints too small. An O(n) sieve solution can easily pass. Problem moved to tutorial. |
Added by: | [UNI]Jonathans |
Date: | 2013-03-14 |
Time limit: | 1.010s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | C CSHARP C++ 4.3.2 CPP C99 JAVA |
Resource: | TJU Team Selection Contest 2009 (4) |