Why the following code is incorrect can someone review it?
for _ in range(int(input())):
x,y=map(int,input().split())
c=0
while x<y:
c+=1
x+=x
print(c)
Why the following code is incorrect can someone review it?
for _ in range(int(input())):
x,y=map(int,input().split())
c=0
while x<y:
c+=1
x+=x
print(c)
your output will be wrong for when x=3 and y=5 in that case output will be 0 but according to your code output will be 1
you are missing one test case ,i will recommand you that anaylyse all the test cases
and rewrite the code again this will help you to improve your code