Help me in solving BLITZ3_2 problem

My issue

unable to code what is logic of this?

My code

# cook your dish here
t = int(input())
for i in range(t):
    n,a,b = map(int,input().split())
    total = 2*(180+n)
    left = a + b    
    total_duration = total - left
    print(total_duration)

Problem Link: BLITZ3_2 Problem - CodeChef

As there are 2 players time allotted to each player is 180s and during each turn 2s is added to the overall time therefore total time would be 180sX2players + 2sXNturns. A and B denote the time left in each clock. If both clocks were to reach 0 then the total time elapsed would be 180sX2players + 2sXNturns but as it doesn’t we subtract (A+B) from the total time.