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: supposeyou 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打表也是技术活,不能多开数组,不然要爆内存
相关文章推荐
- sqlServer 查看表结构(字段类型)
- swift学习笔记一
- 如何写模块化的代码?
- Chorme Error 312 (net::ERR_UNSAFE_PORT) | Chorme 不信任端口
- js 事件监听 冒泡事件
- WebLogic10安装图文教程
- scrolling 优化 避免卡顿
- 云端中间层负载均衡工具 Eureka
- AFNetworking3.0.4使用指南
- mongodb mapreduce 文档
- 4.5
- 禁止ip访问网站跳转到域名
- 欧拉函数(模板)
- 如何让虚拟目录里面的webconfig不继承网站的设置
- Commando War uva11729(贪心)
- php 连接mysql
- hadoop的概念
- 作业二
- Android listview item中使用TextWatcher
- HDU 2058 The sum problem