Skip to content

Commit f743d25

Browse files
authored
Update 4.py
1 parent defe3c3 commit f743d25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

appendix-B/4.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33

44
def solution(n: int, t: int, m: int, timetable: List[str]) -> str:
5-
# 입력값 단위 전처리
5+
# 입력값 단위 전처리
66
timetable = [
77
int(time[:2]) * 60 + int(time[3:])
88
for time in timetable
@@ -12,13 +12,13 @@ def solution(n: int, t: int, m: int, timetable: List[str]) -> str:
1212
current = 540
1313
for _ in range(n):
1414
for _ in range(m):
15-
# 대기가 있는 경우 1초 전 도착
15+
# 대기가 있는 경우 1분 전 도착
1616
if timetable and timetable[0] <= current:
1717
candidate = timetable.pop(0) - 1
1818
else: # 대기가 없는 경우 정시 도착
1919
candidate = current
2020

2121
current += t
22-
# 분, 초로 다시 변경
22+
# 시, 분으로 다시 변경
2323
h, m = divmod(candidate, 60)
2424
return str(h).zfill(2) + ':' + str(m).zfill(2)

0 commit comments

Comments
 (0)