We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 87a4f83 commit a73f379Copy full SHA for a73f379
learntosurf/Baekjoon/2_조건문/.cph/2525.py
@@ -0,0 +1,31 @@
1
+# 내 풀이
2
+A, B = map(int, input().split())
3
+C = int(input())
4
+
5
+if C < 60:
6
+ if B+C >= 60:
7
+ print((A+1)%24, B+C-60)
8
+ else:
9
+ print(A%24, B+C)
10
+elif C == 60:
11
+ print(A+1, B)
12
+else:
13
+ if B+(C%60) >= 60:
14
+ print((A+(C//60)+1)%24, B+(C%60)-60)
15
16
+ print((A+(C//60))%24, B+(C%60))
17
18
+# 다른 풀이
19
20
21
22
+A += C // 60
23
+B += C % 60
24
25
+if B >= 60:
26
+ A += 1
27
+ B -= 60
28
+if A >= 24:
29
+ A -= 24
30
31
+print(A,B)
0 commit comments