Friends number

2020年1月17日 1240点热度 0人点赞 0条评论

Friends number

时间: 1ms        内存:128M

描述:

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.

示例输入:

1 100
1 1000

示例输出:

0
1

提示:

参考答案:

解锁文章

没有看到答案?微信扫描二维码可免费解锁文章

微信扫描二维码解锁

使用微信扫描二维码打开广告页面后可以立即关闭,再刷新此页面即可正常浏览此文章

所跳转广告均由第三方提供,并不代表本站观点!

已经扫描此二维码?点此立即跳转

code

这个人很懒,什么都没留下

文章评论