mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
20 lines
426 B
C++
20 lines
426 B
C++
|
#include <stdio.h>
|
||
|
int main(void)
|
||
|
{
|
||
|
int n, i;
|
||
|
int t[6];
|
||
|
scanf("%d", &n);
|
||
|
while (n--)
|
||
|
{
|
||
|
for (i = 0 ; i < 6 ; i++)
|
||
|
scanf("%d", t + i);
|
||
|
t[1] += (t[2] + t[5]) / 60;
|
||
|
t[2] = (t[2] + t[5]) % 60;
|
||
|
t[0] += (t[1] + t[4]) / 60;
|
||
|
t[1] = (t[1] + t[4]) % 60;
|
||
|
t[0] += t[3];
|
||
|
printf("%d %d %d\n", t[0], t[1], t[2]);
|
||
|
}
|
||
|
return 0;
|
||
|
}
|