Logo
(追記) (追記ここまで)

30544번 - Cuckoo! Cuckoo! 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB24114112157.346%

문제

The cuckoo bird pops out of the cuckoo clock and sounds off once on the quarter hour, half hour, and three-quarter hour. At the beginning of each hour, it sounds off the hour (1--12). Given the current time and a target number $N,ドル your task is to determine what time it will be when the cuckoo bird finishes sounding off $N$ times. If the cuckoo bird would be sounding off at the starting time, include those sounds in the count.

If the count is reached on the hour, report the time at the start of that hour. That is, you may assume the cuckoo finishes sounding off before the minute is up.

입력

The input consists of 2 lines. The first line contains the current time in the form HH:MM where 1ドル \leq$ HH $\leq 12$ and 0ドル \leq$ MM $\leq 59,ドル with leading 0's if necessary. The second line contains a single integer representing the target number $N$ such that 1ドル \leq N \leq 200$.

출력

Print the time at which the cuckoo bird has sounded off $N$ times. The time should be printed in the same format as the input.

제한

예제 입력 1

02:36
1

예제 출력 1

02:45

예제 입력 2

12:00
13

예제 출력 2

12:15

예제 입력 3

11:00
30

예제 출력 3

01:00

힌트

출처

ICPC > Regionals > North America > North Central North America Regional > 2023 North Central NA Regional Contest E번

  • 문제를 만든 사람: Charles Riedesel
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /