/* The Euler function |
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) |
Total Submission(s): 224 Accepted Submission(s): 124 |
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
|
Recommend
gaojie
|
相关文章
- BZOJ4805: 欧拉函数求和(杜教筛)
- Project Euler_Problem 193_Few Repeated Digits_欧拉筛+容斥公式
- UVA12995 Farey Sequence [欧拉函数,欧拉筛]
- Poj 2478-Farey Sequence 欧拉函数,素数,线性筛
- poj 2478 Farey Sequence(欧拉函数是基于寻求筛法素数)
- 51nod 1237 最大公约数之和 V3【欧拉函数||莫比乌斯反演+杜教筛】
- 51nod 1227 平均最小公倍数【欧拉函数+杜教筛】
- BZOJ4916 神犇和蒟蒻 【欧拉函数 + 杜教筛】
- 51Nod.1237.最大公约数之和 V3(莫比乌斯反演 杜教筛 欧拉函数)
- 【luogu3768】简单的数学题 欧拉函数(欧拉反演)+杜教筛