CSE1230 – DIVISOR GAME (Solution)

$ 19.99
Category:

Description

Mr. X likes numbers. This time he learned to calculate the sum of the divisors of a number. His father, realizing he can learn very fast, decided to ask him a more interesting version of that problem: Calculates the sum of the divisors of N which are not multiples of K.
Input Format
The first line contains an integer T, the number of cases (1 ≤ T ≤ 105). Each of the following T lines contains two integers N and K (1 ≤ N, K ≤ 5∗10^5). Constraints empty
Output Format
The output will contain T lines, each with the expected answer with the sum of divisors.
Sample Input 0

Sample Output 0

1/1

Reviews

There are no reviews yet.

Be the first to review “CSE1230 – DIVISOR GAME (Solution)”

Your email address will not be published. Required fields are marked *