For this Question: Given a positive integer n. The task is to find the sum of product of all possible pairs of (x, y) where x and y will be represented as such y = floor(n/x), x varies from 1 to n.The first line of input contains an integer T. Each test case contains an integer N.

Constraints:
1 <= T <= 100
1 <= N <= 10^6For each test case in a new line print the required output.Input:
2
5
10

Output:
21
87

Explanation:
Testcase 1:
Following are the possible pairs of (x, y): (1, 5), (2, 2), (3, 1), (4, 1), (5, 1).
So, 1*5 + 2*2 + 3*1 + 4*1 + 5*1 
   = 5 + 4 + 3 + 4 + 5 
   = 21., I have written this Solution Code: import math
 
def sumOfRange(a, b):
    i = (a * (a + 1)) >> 1;
    j = (b * (b + 1)) >> 1;
    return (i - j);
 
def sumofproduct(n):
    sum = 0;
 
    root = int(math.sqrt(n));
    for i in range(1, root + 1):
        up = int(n / i);
 
        low = max(int(n / (i + 1)), root);
 
        sum += (i * sumOfRange(up, low));
        sum += (i * int(n / i));
 
    return sum;
 
T = int(input())
for i in range(T):
    n = int(input())
    print(sumofproduct(n)), In this Programming Language: Python, Now tell me if this Code is compilable or not?