#include<stdio.h> int main() { int ah,am,as,bh,bm,bs,e,f,g; int m; scanf("%d",&m); while(m--) { scanf("%d%d%d%d%d%d",&ah,&am,&as,&bh,&bm,&bs); e=ah+bh; f=am+bm; g=as+bs; if(g>=60) { f=g/60+f; g=g%60; } if(f>=60) { e=f/60+e; f=f%60; } printf("%d %d %d\n",e,f,g); } }
原文:http://www.cnblogs.com/yc721274287/p/4438312.html