Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- setTimeout()
- eport
- https://m.blog.naver.com/tt2t2am1118/221010125300
- 동기
- Import
- async
- webpack
- mysql
- slow and steady
- Project
- 게임
- Porject
- object
- execCommand
- callback
- sql
- js
- promise
- ajax
- 비동기
- addEventListener
- 참고블로그
- JS #프로젝트
- db
- json
- database
- https://youtube.com/playlist?list=PLuHgQVnccGMA5836CvWfieEQy0T0ov6Jh&si=FTaYv8m21EhO-A2K
- 혼프
- prj
- await
Archives
- Today
- Total
C-log
💡2525번 본문
728x90
내가 작성한 코드는 아래와 같다.
H, M = map(int, input().split())
C = int(input())
MC = (M + int(C))
print(f"check : {MC}")
if 60 <= MC:
H += (int(MC / 60))
if 60 < MC:
print("check")
M = MC % 60
else:
M = MC
if H == 24:
H = 0
print(H, M)
# print(int(M / 60))
굉장히 정갈하지 못하다.
정답은 아래와 같다.
H, M = map(int, input().split())
timer = int(input())
H += timer // 60
M += timer % 60
if M >= 60:
H += 1
M -= 60
if H >= 24:
H -= 24
print(H, M)
728x90
Comments