#include<iostream>
#include<cstdio>
#include<cmath>
#include<string>
using namespace std;
int main(){
int n;
cin >> n;
while(n--){
int a,b,c,d,e,f;
cin >> a >> b >> c >> d >> e >> f;
int x,y,z;
z = c + f;
y = z / 60 + b + e;
z %= 60;
x = y / 60 + a + d;
y %= 60;
cout << x << " " << y << " " << z << endl;
}
return 0;
}
杭电oj 2033
最新推荐文章于 2023-07-10 22:44:14 发布