
#include <bits/stdc++.h>
#define int long long
using namespace std;
typedef long long LL;
const int N = 1e2 + 2;
const int M = 1e6 + 2;
const int K = 2e6 + 2;
const int INF = 0x3f3f3f3f;
int test, xa, xb, xc, maxx;
signed main() {
scanf("%lld", &test);
while (test--) {
scanf("%lld%lld%lld", &xa, &xb, &xc);
maxx = max({xa, xb, xc});
if ((3 * maxx - xa - xb - xc) % 3 == 0) {
printf("%lld\n", (3 * maxx - xa - xb - xc) / 3);
} else {
puts("-1");
}
}
return 0;
}
前 3 个数据都过了,就是最后一个样例怎么没过(结果恰好是两倍)/kk