fork download
  1. t = int(input())
  2.  
  3. for _ in range(t):
  4. a, b, c = map(int, input().split())
  5.  
  6. diff = abs(a - b)
  7.  
  8. print(max(diff, c - diff))
Success #stdin #stdout 0.1s 14148KB
stdin
5
3 6 3
3 6 10
5 5 4
2 5 6
67676767 41414141 998244353
stdout
3
7
4
3
971981727