Skip to content

Commit 497ca01

Browse files
authored
[BOJ] 알림시계 / 브론즈3 / 10분(∆) -m " https://www.acmicpc.net/problem/2884"
1 parent 81473ba commit 497ca01

File tree

1 file changed

+22
-0
lines changed
  • learntosurf/Baekjoon/2_조건문

1 file changed

+22
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# 내 풀이
2+
H, M = map(int, input().split())
3+
4+
if M < 45:
5+
H = H - 1
6+
M = M + 15
7+
if H < 0:
8+
H = 23
9+
else:
10+
M = M - 45
11+
12+
print(H, M)
13+
14+
# 다른 풀이
15+
H,M = map(int,input().split())
16+
17+
if M > 44:
18+
print(H, M-45)
19+
elif M<45 and H>0:
20+
print(H-1,M+15)
21+
else:
22+
print(23,M+15)

0 commit comments

Comments
 (0)