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
- callback
- setTimeout()
- database
- https://m.blog.naver.com/tt2t2am1118/221010125300
- await
- webpack
- 동기
- Project
- slow and steady
- sql
- 게임
- eport
- 혼프
- promise
- Import
- json
- js
- object
- addEventListener
- execCommand
- https://youtube.com/playlist?list=PLuHgQVnccGMA5836CvWfieEQy0T0ov6Jh&si=FTaYv8m21EhO-A2K
- async
- ajax
- db
- mysql
- 참고블로그
- 비동기
- JS #프로젝트
- prj
- Porject
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