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.
enjoyd doin it ... :D
@ps my id 9651682 why i m not getting output and why i m also getin wrong answer
I don't know why I am getting WA while using C , I have used correct logic int type for all the digits and double for storing sqrt of gcd :/
long long to int , cinto scanf ... then it gets AC :-/
SIGSEGV in my code ..
Last edit: 2014-02-27 07:50:28
really nice one, try using gcd ;-D
Mir Wasi Ahmed, please check and tell what is wrong with my solution.
AC with scanf/printf