编程介的小学生 2017-01-04 07:04 采纳率: 20.5%
浏览 977
已采纳

Become A Hero

问题描述 :

Lemon wants to be a hero since he was a child. Recently he is reading a book called “Where Is Hero From” written by ZTY. After reading the book, Lemon sends a letter to ZTY. Soon he recieves a reply.

Dear Lemon,
It is my way of success. Please caculate the algorithm, and secret is behind the answer. The algorithm follows:
Int Answer(Int n)
{
…….Count = 0;
…….For (I = 1; I <= n; I++)
…….{
…………..If (LCM(I, n) < n * I)
………………..Count++;
…….}
…….Return Count;
}
The LCM(m, n) is the lowest common multiple of m and n.
It is easy for you, isn’t it.
Please hurry up!
ZTY

What a good chance to be a hero. Lemon can not wait any longer. Please help Lemon get the answer as soon as possible.

输入:

First line contains an integer T(1 <= T <= 1000000) indicates the number of test case. Then T line follows, each line contains an integer n (1 <= n <= 2000000).
输出:

First line contains an integer T(1 <= T <= 1000000) indicates the number of test case. Then T line follows, each line contains an integer n (1 <= n <= 2000000).
样例输入:

1
1
样例输出:

0

  • 写回答

1条回答

  • threenewbee 2017-01-11 16:44
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料