人见人爱A+B

#include <iostream>
#include <cmath>
using namespace std;

int main()
{
	int n, ah, am, as, bh, bm, bs;
	int result_s, result_m, result_h;
	while(cin >> n)
	{
		while(n --)
		{
			cin >> ah >> am >> as >> bh >> bm >> bs;
			result_s = (as + bs) % 60;
			result_m = (am + bm) % 60 + (as + bs) / 60;
			result_h = ah + bh + (am + bm) / 60;
			cout << result_h << " " << result_m << " " << result_s << endl;
		}
	}
	
	return 0;
}

  

posted @ 2019-07-31 12:01  青衫客36  阅读(117)  评论(0编辑  收藏  举报