• [H] A + B Again

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • One day, TT asked Mr. Cai a question about A + B .But this question is not simple, A, B are represent the time.
    A and B are composed of three integers, respectively hours, minutes and seconds, for instance, assume that A is 34 45 56, it means that A is represented by time is 34 hour 45 minutes 56 seconds.

  • 输入
  • Input data is composed of more than one line, the first is an integer N indicates the number of test case, then N rows of data per line six integer AH, AM, AS, BH, BM, BS, time A and B respectively the corresponding Hours,Minutes and Seconds. Topics to ensure that all data is legitimate.
  • 输出
  • For each test case, output A + B, each output results by the hours, minutes, seconds Part 3, as well as meet the rules of the time (ie: minutes and seconds range from 0 to 59), each outputper line, and all parts are available on a 32-bit integer
  • 样例输入
  • 2
    1 1 1 1 1 1
    2 2 2 2 2 58
  • 样例输出
  • 2 2 2
    4 5 0
  • 提示
  • 来源
  • Minary
  • 操作

显示春菜