Showing wrong answers for correct output


For Input
A: 64
B: 6
I am getting correct output when I run using custom input i.e.

but I am getting Wrong answer while submitting. Judge says code returns
while the expected output is

I think there is a conflict with global variable, Can you please check what the issue is?


In your answer:
gcd(16, 6) = 2, where X = 16, B = 6
The problems says we want gcd(X, B) = 1