Calculate the number of pair of divisors of a number that are co prime.
First line contains the number of test cases T.
Second line contains the number N.
For each test case print the number of pairs in a new line.
Calculate factors of 6 i.e. 1,2,3
Now we have to find the co prime factors. A Co Prime factor is tuple with HCF 1.
So (1,2), (1,3), (2,3), (1,2,3).
To get this combinations we will use itertools combinations.
Try it yourself and find the solution below.
Follow Programmers Door for more.