https://www.acmicpc.net/problem/2884
_hour, _minute = map(int, input().split())
hour = 0
minute = 0
minute = _minute - 45
if minute >= 0:
print(_hour, minute)
else:
hour = _hour - 1
if hour < 0:
print(hour + 24, minute + 60)
else:
print(hour, minute + 60)
반응형
'자료구조&알고리즘 > 알고리즘-문제풀이' 카테고리의 다른 글
[BAEKJOON] 4673-셀프 넘버 (0) | 2021.07.14 |
---|---|
[BAEKJOON] 2577-숫자의 개수 (0) | 2021.06.30 |
Leetcode-easy-13. Roman to Integer (0) | 2020.07.15 |
Leetcode-easy-9. Palindrome Number (0) | 2020.07.14 |
Leetcode-easy-7. Reverse Integer (0) | 2020.07.14 |