Skip to content

Commit

Permalink
[BOJ] 2525
Browse files Browse the repository at this point in the history
  • Loading branch information
heerucan committed Apr 12, 2022
1 parent 69f8aeb commit 60febb5
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions BOJ/2525.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
a, b = map(int, input().split())
c = int(input())

if (b+c) >= 60:
if (b+c) % 60 >= 0:
a += (b+c)//60
b = (b+c)-(60*((b+c)//60))
if a >= 24:
# a = 0
a = a - 24
else:
a += 1
b = (b+c - 60)
if a >= 24:
a = a - 24
# a = 24 - a
print(a, b)
else:
print(a, b+c)



0 comments on commit 60febb5

Please sign in to comment.