Please enter your email address or userHandle.
Given two numbers, p and q. Find the number of common divisors of p and q.
Each input consists of T,the number of test cases. Each test case consists of two integers p and q.
Output consists of a single line denoting the number of common divisiors of p and q.
We strongly recommend solving this problem on your own before viewing its editorial. Do you still want to view the editorial?
Login to access your submissions.
Please choose 'ReadOnlyMode' if you needn't to 'Edit' the problem e.g. viewing OJ's solution, TestCase Files (TCFs), TimeLimit etc.