
정답 코드
import sys
input = sys.stdin.readline
h, m = map(int, input().split())
m = m - 45
if m < 0 :
m += 60
h -= 1
if h < 0 :
h += 24
print(h,m)
'코딩 테스트 > 백준' 카테고리의 다른 글
[Python] 백준 2798 블랙잭 (0) | 2024.12.18 |
---|---|
[Python] 백준 2525 오븐 시계 (0) | 2024.11.25 |
[Python] 백준 11399 ATM (0) | 2024.10.22 |
[Python] 백준 1931 회의실 배정 (0) | 2024.10.21 |
[Python] 백준 11047 동전 0 (0) | 2024.10.21 |