From d5195ce809fc726f79434efc792920899156757d Mon Sep 17 00:00:00 2001 From: froglike6 Date: Mon, 25 Aug 2025 17:08:34 +0900 Subject: [PATCH] 2025-08-25 --- froglike6/README.md | 1 + froglike6/implementation/34024.py | 38 +++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 froglike6/implementation/34024.py diff --git a/froglike6/README.md b/froglike6/README.md index 7d82e43..7c0d3fe 100644 --- a/froglike6/README.md +++ b/froglike6/README.md @@ -26,4 +26,5 @@ | 22차시 | 2025.07.22 | 그래프 | [밤(Time For The Moon Night)](https://www.acmicpc.net/problem/34064)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/88| | 23차시 | 2025.07.22 | 정수 | [Fibonacci](https://www.acmicpc.net/problem/7677)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/89| | 24차시 | 2025.08.01 | 구현 | [세그먼트 트리보다도 바・로・너・♡](https://www.acmicpc.net/problem/34075)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/91| + | 25차시 | 2025.08.25 | 구현 | [창하의 고장난 시계 이야기](https://www.acmicpc.net/problem/34024)|https://github.com/AlgoLeadMe/AlgoLeadMe-13/pull/94| --- diff --git a/froglike6/implementation/34024.py b/froglike6/implementation/34024.py new file mode 100644 index 0000000..07ff0fe --- /dev/null +++ b/froglike6/implementation/34024.py @@ -0,0 +1,38 @@ +import sys +input = sys.stdin.readline + +def gojangnan_clock(h, m, n): + theta_h = h * 30 + theta_m = m * 6 + delta0 = (theta_m - theta_h) % 360 + t1 = (360 - delta0) / 6 + t = n + if t <= t1: + theta_h += 6 * t + theta_m += 12 * t + t=0 + else: + theta_h += 6 * t1 + theta_m += 12 * t1 + t -= t1 + block = t//80 + theta_h += 6 * 80 * block + theta_m += 120 * block + t -= 80 * block + if t <= 20: + theta_h += 6 * t + theta_m -= 12 * t + t=0 + else: + theta_h += 120 + theta_m -= 240 + t -= 20 + theta_h += 6 * t + theta_m += 12 * t + t = 0 + theta_h %= 360 + theta_m %= 360 + return (int(theta_h // 30) % 12, int(theta_m // 6)) +h, m = map(int, input().split()) +n = int(input()) +print(*gojangnan_clock(h,m,n)) \ No newline at end of file