hdu2033

http://acm.hdu.edu.cn/showproblem.php?pid=2033 
1
#include 2 #include<string.h> 3 #include 4 #include 5 using namespace std; 6 7 8 9 int main() 10 { 11 //freopen("in.txt","r",stdin); 12 int n; 13 scanf("%d",&n); 14 while(n--) 15 { 16 int ah,am,as,bh,bm,bs; 17 scanf("%d%d%d%d%d%d",&ah,&am,&as,&bh,&bm,&bs); 18 ah+=bh; 19 am+=bm; 20 as+=bs; 21 int t; 22 t=as/60; 23 as=as%60; 24 25 am+=t; 26 t=am/60; 27 am=am%60; 28 29 ah+=t; 30 printf("%d %d %d\n",ah,am,as); 31 } 32 return 0; 33 }

 

你可能感兴趣的:(ACM编程题)