[BOJ 13076] Distinct rational numbers

View as PDF

Submit solution

Points: 3
Time limit: 2.0s
Memory limit: 512M

Problem types
Allowed languages
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text

You are to write a program to compute the number of distinct rational numbers a/b for the given positive integer N where 0 ≤ a ≤ b ≤ N.

입력 형식

The first line of the input includes the number of test cases, 1 ≤ t ≤ 10000. Each test case comes in one line containing 2 ≤ N ≤ 10000.

출력 형식

For each test case, print the number of distinct rational numbers in one line.

예제 입력

4
6
15
57
9999

예제 출력

13
73
1001
30393487

Comments

There are no comments at the moment.