题库练习 Strange Function
← 上一题 下一题 →

A14462 | Strange Function

时间限制1s
内存限制256MB
通过 / 提交0/0

题目描述

Let $f(i)$ denote the minimum positive integer $x$ such that $x$ is not a divisor of $i$ .

Compute $\sum_{i=1}^n f(i)$ modulo $10^9+7$ . In other words, compute $f(1)+f(2)+\dots+f(n)$ modulo $10^9+7$ .

输入格式

The first line contains a single integer $t$ ( $1\leq t\leq 10^4$ ), the number of test cases. Then $t$ cases follow.

The only line of each test case contains a single integer $n$ ( $1\leq n\leq 10^{16}$ ).

输出格式

For each test case, output a single integer $ans$ , where $ans=\sum_{i=1}^n f(i)$ modulo $10^9+7$ .

输入输出样例

输入 #1
6
1
2
3
4
10
10000000000000000
输出 #1
2
5
7
10
26
366580019
C++ 编辑器
输入
输出