Help me in solving BLITZ3_2 problem

My issue

My code

# cook your dish here
for _ in range(int(input())):
    N,a,b=map(int,input().split())
    

Problem Link: BLITZ3_2 Problem - CodeChef