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 |
Tags
- 수학
- writeup
- 문자열
- 그리디 알고리즘
- Web Hacking
- SuNiNaTas
- MySQL
- xcz.kr
- Web
- Forensics
- CTF
- Database
- Incognito
- HackCTF
- 써니나타스
- 백준
- Network
- 인코그니토
- 구현
- wargame
- cryptography
- Python
- php
- Digital Forensics
- C
- Text
- N0Named
- 사칙연산
- misc
- 정렬
Archives
- Today
- Total
보안을 그리다, 훈이
[Baekjoon/Python3] 2525번 오븐 시계 본문
[Baekjoon/Python3] 2525번 오븐 시계
2525번: 오븐 시계
첫째 줄에 종료되는 시각의 시와 분을 공백을 사이에 두고 출력한다. (단, 시는 0부터 23까지의 정수, 분은 0부터 59까지의 정수이다. 디지털 시계는 23시 59분에서 1분이 지나면 0시 0분이 된다.)
www.acmicpc.net
# 초 단위 계산
a, b = map(int, input().split())
c = int(input())
min = a * 60 + b + c
if min >= 1440:
min -= 1440
print(min // 60, min % 60)
# 분 단위 계산
a, b = map(int, input().split())
c = int(input())
if (b + c) >= 60:
h = (c + b) // 60
b = (c + b) % 60
a += h
if a >= 24:
a -= 24
else:
b += c
print(a, b)
'Programming > Python & Data Structures' 카테고리의 다른 글
[Baekjoon/Python3/Text] 2555번 생일 출력하기 (0) | 2020.12.03 |
---|---|
[Baekjoon/Python3] 2530번 인공지능 시계 (0) | 2020.12.03 |
[Baekjoon/Python3] 2523번 별 찍기 - 13 (0) | 2020.12.03 |
[Baekjoon/Python3] 2522번 별 찍기 - 12 (0) | 2020.12.03 |
[Baekjoon/Python3] 2506번 점수계산 (0) | 2020.12.03 |
Comments