OJ系统新功能测试中,如有问题请联系 15864441230 17853533775 15684102985 17853533719 尽量不要在上课时间打电话

Problem 1079. -- Friends number

1079: Friends number

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 5  Solved: 2
[Submit][Status][Web Board]


Paula and Tai are couple. There are many stories between them. The day Paula left by airplane, Tai send one message to telephone 2200284, then, everything is changing… (The story in “the snow queen”).

After a long time, Tai tells Paula, the number 220 and 284 is a couple of friends number, as they are special, all divisors of 220’s sum is 284, and all divisors of 284’s sum is 220. Can you find out there are how many couples of friends number less than 10,000. Then, how about 100,000, 200,000 and so on.

The task for you is to find out there are how many couples of friends number in given closed interval [a,b]


There are several cases.

Each test case contains two positive integers a, b(1<= a <= b <=5,000,000).

Proceed to the end of file.


For each test case, output the number of couples in the given range. The output of one test case occupied exactly one line.

Sample Input

1 100
1 1000

Sample Output



6 is a number whose sum of all divisors is 6. 6 is not a friend number, these number is called Perfect Number.


[Submit][Status][Web Board]