Type: Default 1000ms 256MiB

起床时间

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

到寒假了,挖土机开始了寒假集训。33DAI 这几天上午都要上课。

已知上课时间为上午的 hhmm 分,33DAI 从起床到赶到教室需要 xx 分钟。

请问 33DAI 最晚什么时间起床才不会迟到。

输入格式

第一行三个整数 h,m,xh,m,x

输出格式

输出一行,为两个整数 H,MH,M,表示 33DAI 最晚必须 HHMM 分钟起床才不会迟到。

请不要输出多余的前导 00,比如时间 07:05 请输出 7 5

8 0 50
7 10
10 30 25
10 5

样例解释

  • 样例 1:上课时间为 08:00,33DAI 需要 5050 分钟能到学校,所以最晚起床时间为 07:10
  • 样例 2:上课时间为 10:30,33DAI 需要 2525 分钟能到学校,所以最晚起床时间为 10:05

数据规模与约定

对于 100%100\% 的数据,8h118\le h \le 110m590\le m\le 591x1201\le x \le 120

  • 子任务 1(30 分):保证 xmx\le m
  • 子任务 2(30 分):保证 x=60x = 60
  • 子任务 3(40 分):没有特殊限制。

R9

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
7
Start at
2024-3-16 14:00
End at
2024-3-24 22:00
Duration
200 hour(s)
Host
Partic.
16