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

34299번 - Clock Catchup 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB100806482.051%

문제

Oh no! The clocks in Marquez Hall froze at the start of a power outage, which has now been remedied. The repair crew needs your help figuring out how to restore the current time.

Each analog clock has three arms: seconds, minutes, and hours. Given the time of the power outage and the time the power was restored (the current time), how many times does each arm of the clock have to move onto the 12ドル$ to get to current time from the time where the clock froze due to the power outage?

Note: we are explicitly asking for how many times the arm moves onto the 12ドル$. If the arm starts at 12ドル$ and moves off of it, that does not count as moving onto the 12ドル$.

If you're unfamiliar with analog clocks, check out this interactive site: https://toytheater.com/clock/.

입력

The input will consist of two newline-separated 24ドル$-hour time strings representing the start of the power outage, and the current time (the time at which the power was restored), respectively.

Both times are in the format HH:MM:SS where HH is the hour, MM is the minute, and SS is the second. All times are guaranteed to be valid, and leading zeros will be present for single-digit hours, minutes, and seconds.

You are guaranteed that the hour will be in the range $[00, 23],ドル the minute will be in the range $[00, 59],ドル and the second will be in the range [00,ドル 59$].

Note that the minimum valid time is 00:00:00, and the maximum valid time is 23:59:59. The first time (the time of the power outage) is guaranteed to be before the second time (the time of power restoration). Both times are guaranteed to be within the same calendar day.

출력

Output three space-separated integers on a single line, representing how many times the hour arm, minute arm, and second arm moves onto the 12ドル,ドル respectively, to get to the current time from the time where the clock froze due to the power outage.

제한

예제 입력 1

01:00:01
01:01:35

예제 출력 1

0 0 1

예제 입력 2

06:00:59
13:50:01

예제 출력 2

1 7 470

예제 입력 3

12:59:58
13:00:01

예제 출력 3

0 1 1

예제 입력 4

12:00:00
12:00:01

예제 출력 4

0 0 0

예제 입력 5

11:59:59
12:01:01

예제 출력 5

1 1 2

예제 입력 6

11:59:59
12:00:00

예제 출력 6

1 1 1

힌트

출처

School > CS@Mines > CS@Mines HSPC 2024 C번

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

출처

대학교 대회

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

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