#P15765. [JAG 2025 Summer Camp #1] Sum of Floor(N/ij)

[JAG 2025 Summer Camp #1] Sum of Floor(N/ij)

题目描述

You are given a positive integer NN. Find the value

$$\sum_{i=1}^{N} \sum_{j=1}^{N} \left\lfloor \frac{N}{ij} \right\rfloor $$

You are given TT test cases, so find the answer for each.

输入格式

The input is given in the following format:

$$\begin{aligned} & T \\ & \text{case}_1 \\ & \text{case}_2 \\ & \vdots \\ & \text{case}_T \end{aligned}$$

casei\text{case}_i represents the ii-th test case. Each test case is given in the following format:

NN
  • 1T1001 \leq T \leq 100
  • 1N1091 \leq N \leq 10^9
  • All input values are integers.

输出格式

Output TT lines. On the ii-th line (1iT1 \leq i \leq T), output the answer to the ii-th test case.

10
1
10
100
1000
10000
100000
1000000
10000000
100000000
1000000000
1
53
1471
29425
496623
7518850
106030594
1421760251
18362473634
230375375227