Possible GCD Solution Codechef
Possible GCD Solution Codechef Chef has two distinct positive integers A and B. Chef wonders how many distinct values are possible for the expression gcd(A+X,B+X), where X can take any non-negative integer value. Help Chef find this value. Here, gcd stands for Greatest Common Divisor. Input Format The first line contains a single integer T — the number of test cases. Then the test cases follow. The first … Read more