t = int(input()) for _ in range(t): a, b, c = map(int, input().split()) diff = abs(a - b) print(max(diff, c - diff))
5 3 6 3 3 6 10 5 5 4 2 5 6 67676767 41414141 998244353
3 7 4 3 971981727
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!