编程介的小学生 2020-01-16 11:43 采纳率: 20.5%
浏览 131

Number Theory? 数字的表示问题

Problem Description
In number theory, for a positive number N, two properties are often mentioned, one is Euler's function, short for E(N), another is factor number, short for F(N).
To be more precise for newbie, here we recall the definition of E(N) and F(N) again.
E(N) = |{i | gcd(N, i) = 1, 1 <= i <= N}|
F(N) = |{i | N % i = 0, 1 <= i <= N}|
Here |Set| indicates the different elements in the Set.
As a number fanaticism, iSea want to solve a simple problem now. Given a integer N, try to find the number of intervals [l, r], l is no bigger than r obviously, strictly fit in the interval [1, N]. It's a piece of cake for clever you, of course. But here he also has another troublesome restrict:

Input
The first line contains a single integer T, indicating the number of test cases. Each test case includes one integer N.

Technical Specification
1. 1 <= T <= 1 000
2. 1 <= N <= 1 000 000 000

Output
For each test case, output the case number first, then the number of intervals.

Sample Input
2
2
9

Sample Output
Case 1: 1
Case 2: 6

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 有兄弟姐妹会用word插图功能制作类似citespace的图片吗?
    • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
    • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
    • ¥15 乘性高斯噪声在深度学习网络中的应用
    • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
    • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
    • ¥15 C++ 头文件/宏冲突问题解决
    • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
    • ¥50 安卓adb backup备份子用户应用数据失败
    • ¥20 有人能用聚类分析帮我分析一下文本内容嘛