๋์ ์ฝ๋
T = int(input())
# ์ฌ๋ฌ๊ฐ์ ํ
์คํธ ์ผ์ด์ค๊ฐ ์ฃผ์ด์ง๋ฏ๋ก, ๊ฐ๊ฐ์ ์ฒ๋ฆฌํฉ๋๋ค.
for t in range(1, T + 1):
h1,m1,h2,m2 = map(int,input().split())
h= h1+h2
m=m1+m2
if m > 60:
m -= 60
h += 1
if h > 12:
h -= 12
print("#"+str(t) , h , m)
h += m//60
m = m%60
if ์กฐ๊ฑด์ ์ด ์๋ ๋๋๊ธฐ ๋ชซ์ผ๋ก
์ด๋ ๊ฒ ํ์ด๋ ๋์๋ฏ
'Algorithm > SWEA' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[SWEA - D2] 1204. ์ต๋น์ ๊ตฌํ๊ธฐ (0) | 2023.04.18 |
---|---|
[SWEA - D2] 1983. ์กฐ๊ต์ ์ฑ์ ๋งค๊ธฐ๊ธฐ (0) | 2023.04.17 |
[SWEA - D2] 1926. ๊ฐ๋จํ 369๊ฒ์ (0) | 2023.04.15 |
[SWEA - D2] 1970. ์ฌ์ด ๊ฑฐ์ค๋ฆ๋ (0) | 2023.04.15 |
[SWEA - D2] 1940. ๊ฐ๋! RC์นด! (0) | 2023.04.13 |