From 60febb541826d4897d27883739d5ef1903c2b743 Mon Sep 17 00:00:00 2001 From: heerucan Date: Tue, 12 Apr 2022 16:28:52 +0900 Subject: [PATCH] [BOJ] 2525 --- BOJ/2525.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/BOJ/2525.py b/BOJ/2525.py index e69de29..25b3c63 100644 --- a/BOJ/2525.py +++ b/BOJ/2525.py @@ -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) + + +