COMDIV - Number of common divisors
You will be given T (T<=10^6) pair of numbers. All you have to tell is the number of common divisors between two numbers in each pair.
First line of input: T (Number of test cases)
In next T lines, each have one pair A B (0 < A, B <= 10^6)
One integer describing number of common divisors between two numbers.
cin and cout gives TLE.
do not use cin or cout. it wil give tle. wasted my 2 hrs on such a easy ques.
I am back:
easy one AC in first attempt
Got AC in 1st attempt! Easy one! took only 15 minutes.
i am getting WA pls help someone
AC with O(sqrt(gcd(a,b))).. !!
dont use long long and cin cout .. it will time out
Is 0,0 also a test case....i m gettin WA while it run perfectly on ideone....my id 9812939