CF622B.The Time
入门
通过率:0%
时间限制:1.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
You are given the current time in 24-hour format hh:mm. Find and print the time after a minutes.
Note that you should find only the time after a minutes, see the examples to clarify the problem statement.
You can read more about 24-hour format here https://en.wikipedia.org/wiki/24-hour_clock.
给你当前时间(24 小时制),格式为 hh:mm。请计算并输出经过 a 分钟后的时间。
注意:你只需计算并输出经过 a 分钟后的时间,请参考样例以明确题意。
关于 24 小时制的更多信息,可参见 https://en.wikipedia.org/wiki/24-hour_clock。
输入格式
The first line contains the current time in the format hh:mm (0 ≤ hh < 24, 0 ≤ mm < 60). The hours and the minutes are given with two digits (the hours or the minutes less than 10 are given with the leading zeroes).
The second line contains integer a (0 ≤ a ≤ 104) — the number of the minutes passed.
第一行包含当前时间,格式为 hh:mm(其中 0≤hh<24,0≤mm<60)。小时和分钟均以两位数字表示(即不足 10 的小时或分钟前面补零)。
第二行包含一个整数 a(0≤a≤104)—— 已经过去的分钟数。
输出格式
The only line should contain the time after a minutes in the format described in the input. Note that you should print exactly two digits for the hours and the minutes (add leading zeroes to the numbers if needed).
See the examples to check the input/output format.
唯一的一行应包含经过 a 分钟后的时间,格式与输入中描述的相同。注意:小时和分钟均应恰好输出两位数字(必要时在数字前补零)。
请参阅示例以确认输入/输出格式。
输入输出样例
输入#1
23:59 10
输出#1
00:09
输入#2
20:20 121
输出#2
22:21
输入#3
10:10 0
输出#3
10:10
输入解题思路,AI测评打分。不知道怎么写?