Today is Chef's birthday. His mom has surprised him with truly fruity gifts: 2 fruit baskets. The first basket contains N apples, and the second one contains M oranges. Chef likes apples and oranges very much but he likes them equally, and therefore, wants to have the minimum possible difference between the number of apples and oranges he has. To do so, he can purchase 1 apple or 1 orange by paying exactly 1 gold coin (that's some expensive fruit, eh?). Chef can purchase fruits at most K times (as he has only K gold coins in his pocket) to make the difference the minimum possible.
Our little Chef is busy in celebrating his birthday to the fullest, and therefore, he has handed this job to his best friend — you. Can you help him by finding the minimum possible difference he can achieve between the number of apples and orange he owns?

-----Input-----
The first line of input contains a single integer T denoting the number of test cases. The first and only line of each test case contains 3 space separated integers — N, M and K — denoting the number of apples, number of oranges, and number of gold coins our little Chef has.

-----Output-----
For each test case, output the minimum possible difference between the number of apples and oranges that Chef can achieve.

-----Constraints-----
- 1 ≤ T ≤ 100
- 1 ≤ N, M, K ≤ 100

-----Example-----Input
3
3 4 1
5 2 1
3 4 3

Output
0
2
0

-----Explanation-----
- Test 1: Chef will buy 1 apple by paying 1 gold coin and will have equal number of apples and oranges. 
- Test 2: Chef will buy 1 orange by paying 1 gold coin and will have 5 apples and 3 oranges.

Difficulty: interview

Starter code:

Solutions:
for _ in range(int(input())):
 a,o,g=map(int,input().split())
 while g>0:
  if a<o:
   a+=1
   g-=1
  elif o<a:
   o+=1
   g-=1
  else:
   break
 print(abs(a-o))

# cook your dish here
test_case = int(input())
for i in range(test_case):
 apple ,orange ,coin = map(int,input().split())
 k = abs(apple - orange)
 if(k >= coin):
  print(k - coin)
 else:
  print(0)

# cook your dish here
for i in range(int(input())):
 a,b,k=list(map(int,input().split()))
 k1=abs(a-b)
 if(k1>=k):
  print(k1-k)
 else:
  print(0)


t=int(input())
for i in range(t):
 n, m, k=list(map(int, input().split()))
 k1=abs(n-m)
 if k<=k1:
  print(k1-k)
 else:
  print(0)
 


# cook your dish here
t=int(input())
for i in range(t):
 n,m,k=list(map(int,input().split()))
 if(n>m):
  ma=n
  mi=m
  d=n-m
 elif(m>n):
  ma=m
  mi=n
  d=m-n
 else:
  d=0
 if(d<=k):
  print(0)
 else:
  mi=mi+k
  print(ma-mi)


# cook your dish here
for _ in range(int(input())):
 a,m,g=[int(x) for x in input().split()]
 r=abs(a-m)
 if g<=r:
  print(r-g)
 else:
  print(0)

# cook your dish here
for _ in range(int(input())):
 a,m,g=[int(x) for x in input().split()]
 r=abs(a-m)
 if g<=r:
  print(r-g)
 else:
  print(0)

# cook your dish here
t = int(input())
for i in range(t):
 a,b,c=[int(x) for x in input().split()]
 y= min(a,b)
 z=max(a,b)
 if y+c >= z :
  print(0)
 else:
  print(z-(y+c))

# cook your dish here
N = int(input())
for i in range(N):
 n,m,k=[int(x) for x in input().split()]
 y= min(n,m)
 z=max(n,m)
 if y+k >= z :
  print(0)
 else:
  print(z-(y+k))

N = int(input())
for i in range(N):
 n,m,k=[int(x) for x in input().split()]
 y= min(n,m)
 z=max(n,m)
 if y+k >= z :
  print(0)
 else:
  print(z-(y+k))

# cook your dish here
n=int(input())
for i in range(n):
 n,m,k=list(map(int,input().split()))
 if n==m:
  print(0)
 elif n>m:
  c=(n-m-k)
  if c<=0:
   print(0)
  else:
   print(c)

 else:
  c=m-n-k
  if c<=0:
   print(0)
  else:
   print(c)



# cook your dish here
t=int(input())
for i in range(0,t):
 arr=list(map(int,input().split()))
 n=arr[0]
 m=arr[1]
 k=arr[2]
 if m>n:
  n,m=m,n
 diff=n-m;
 if diff==k:
  print(0)
 elif diff>k:
  print(diff-k)
 else:
  print(0)



# cook your dish here
for i in range(int(input())):
 n,m,k=map(int,input().split())
 if abs(n-m)<=k:
  print(0)
 else:
  print(abs(n-m)-k)

for _ in range(int(input())):
 x, y, z= map(int, input().split())
 if abs(x-y)<=z:
  print(0)
 else:
  print(abs(x-y)-z)

# cook your dish here
x = int(input())
for i in range(x):
 (a, b, c) = map(int, input().split())
 if abs(a-b)==c or abs(a-b)<c:
  print("0")
 elif abs(a-b)>c:
  print(abs(a-b)-c)

t=int(input())
for i in range(t):
 a,o,g=map(int,input().split())
 diff=abs(a-o)
 if diff<=g:
  print(0)
 else:
  print(diff-g)

# cook your dish here
T = int(input())

for t in range(T):
 apples, oranges, coins = input().split()
 apples = int(apples)
 oranges = int(oranges)
 coins = int(coins)
 while coins > 0:
  if apples > oranges:
   oranges += 1 
   coins -= 1
  elif oranges > apples:
   apples += 1
   coins -= 1
  else:
   if coins % 2 == 0:
    half = int(coins / 2)
    apples = apples + half
    oranges = oranges + half
    coins = 0
    break
   else:
    half = int(coins / 2)
    #coins = coins - half
    apples = apples + half
    oranges = oranges + half
    coins = 1
    break
 print(int(abs(apples-oranges))) 
 #print(int(apples - oranges) if apples >= oranges else int(oranges - apples        ))


try:
 for _ in range(int(input())):
  a,o,g=map(int,input().split())
  res=abs(a-o)
  if(res>g):
   print(res-g)
  else:
   print(0)
except:
 pass

# cook your dish here
for _ in range(int(input())):
 a,b,k=list(map(int,input().split()))
 if(max(a,b)-min(a,b)-k)<=0:
  print("0")
 else :
  print(max(a,b)-min(a,b)-k)


# cook your dish here
N=int(input())
for i in range(N):
 m,o,k=list(map(int,input().split()))
 d=abs(m-o)
 if(k>d):
  print(0)
 else:
  print(d-k)


t=int(input())
for i in range(t):
 n,m,k=map(int,input().split())
 diff=abs(n-m)
 
 if(k>diff):
  print(0)
 else:
  print(diff-k)

import math

def makeeql(a,o,g):
 print(abs(max(a,o) - min((min(a,o)+g),max(a,o))))
  
for i in range(int(input())):
 a,o,g = map(int,input().split())
 makeeql(a,o,g)

t=int(input())
for i in range(t):
 n,m,k=list(map(int,input().split()))
 d=abs(n-m)
 if k>=d:
  print("0")
 else:
  print((d-k))# cook your dish here