QOJ.ac

QOJ

Time Limit: 1.0 s Memory Limit: 2048 MB Total points: 100

#16477. Sum of Floor(N/ij)

Statistics

给你一个正整数 $N$。求以下表达式的值:

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

给你 $T$ 组测试数据,请对每组测试数据求出答案。

输入格式

输入按以下格式给出:

$T$ $\text{case}_1$ $\text{case}_2$ $\vdots$ $\text{case}_T$

其中 $\text{case}_i$ 表示第 $i$ 组测试数据。每组测试数据按以下格式给出:

$N$

数据范围

  • $1 \le T \le 100$
  • $1 \le N \le 10^9$
  • 所有输入值均为整数。

输出格式

输出 $T$ 行。在第 $i$ 行($1 \le i \le T$)中,输出第 $i$ 组测试数据的答案。

样例

输入样例 1

10
1
10
100
1000
10000
100000
1000000
10000000
100000000
1000000000

输出样例 1

1
53
1471
29425
496623
7518850
106030594
1421760251
18362473634
230375375227

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.