Showing wrong answer for correct output


#1

For Input
A: 21
B: 49
I am getting correct output when I run using custom input i.e.
3

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

Can you please check what the issue is?