Help me in solving CANDYSTORE problem

My issue

Please explain clearly

My code

# cook your dish here
T=int(input())
for _ in range(T):
    x,y=map(int,input().split())
    if (x>=y):
        print(y)
    else:
        
        

Learning course: Basic Math using Python
Problem Link: Candy Store Practice Problem in - CodeChef

@nsanusha123g
plzz refer following python code

# cook your dish here
t=int(input())
for i in range(t):
    X,Y=map(int,input().split())
    if Y<=X:
        print(Y)
    else:
        print(X+((Y-X)*2))