the above is a code for finding the gcd and lcm of two numbers A and B with the given constraints:
1 <= T <= 10^4
1 <= A <= 10^8
1 <= B <= 10^8
so in this lcm can exceed 10^9 but not A,B and hcf
so why if i write long long int datatype only for the lcm but not for A,B and gcd it is giving incorrect answer?
how does the conversion from int to long long int happen?