Looking at Divisors

Let d(n) be the sum of all divisors of n. For example d(6) = 1+2+3+6 = 12. Given integers n and k, computethesumofallintegersmfor1≤m<n,suchthatd(m)isamultipleofk,i.e. d(m)=l∗k, where l is a positive integer. Input A number of of inputs (≤ 100), each start with the number of value of integers n, k (1 ≤ n,k ≤ 10000000). Output Output the answer modulo 1000000007. Sample Input 10 5 20 5 Sample Output 8 27