您的位置:首页 > 其它

HDU The Euler function (欧拉函数打表)

2016-01-28 15:04 399 查看


Problem Description

The Euler function phi is an important kind of function in number theory, (n) represents the amount of the numbers which are smaller than n and coprime to n, and this function has a lot of beautiful characteristics. Here comes a very easy question: suppose
you are given a, b, try to calculate (a)+ (a+1)+....+ (b)


Input

There are several test cases. Each line has two integers a, b (2<a<b<3000000).


Output

Output the result of (a)+ (a+1)+....+ (b)


Sample Input

3 100



Sample Output

3042



Source

2009 Multi-University Training Contest 1 - Host by TJU

打表也是技术活,不能多开数组,不然要爆内存
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: