Pair Of Numbers

3.2

14 votes
Problem

A Computer Science Engineer from SKIT has been assigned a problem by his Maths Lecturer to find the number of pairs (a,b) within a given range N such that the sum of the two numbers divides the product of the two numbers.

Input:

The first line of the input contains an integer T, denoting number of test cases, only to be followed by T lines. Each of the following line contains the upper limit of range i.e. N

Output:

For each test case, output a single line containing the number of such pairs.

Constraints:

1 <= N <= 10^5 1 <= T <= 10

Time Limit: 4
Memory Limit: 2
Source Limit:
Explanation

In the second test case required pairs are (3, 6), (4, 12), (6, 12) and (10, 15).

Editor Image

?