While Omar was studying for Math lectures, he found the following problem.
Given 3 Integers \(N_1\), \(N_2\), \(N_3\), count the number of common divisors which divide all of them.
Can you please help Omar in solving this problem, because he usually sleeps in lectures.
Input:
Given an integer T, which indicates the number of test cases.
For each test case: given 3 separated integers \(N_1, N_2, N_3\).
Output:
For each test case: print the number of common divisors which divide \(N_1, N_2, N_3\). Print each case in a separate line.
** Constraints:**
\(1 \le T \le 50\)
\(1 \le minimum\; (N_1, N_2 , N_3) \le 10 ^ {12}\)
\(1 \le maximum\; (N_1, N_2 , N_3) \le 10 ^ {18}\)
Please login to use the editor
You need to be logged in to access the code editor
Loading...
Please wait while we load the editor
No editorial available for this problem.