๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Welcome.
:: Python ๐Ÿšฉ/์•Œ๊ณ ๋ฆฌ์ฆ˜

[์ฝ”๋”ฉ] [๋ฐฑ์ค€ 2884 python]

by EunBird 2023. 1. 19.

https://www.acmicpc.net/problem/2884

 

2884๋ฒˆ: ์•Œ๋žŒ ์‹œ๊ณ„

์ƒ๊ทผ์ด๋Š” ๋งค์ผ ์•„์นจ ์•Œ๋žŒ์„ ๋“ฃ๊ณ  ์ผ์–ด๋‚œ๋‹ค. ์•Œ๋žŒ์„ ๋“ฃ๊ณ  ๋ฐ”๋กœ ์ผ์–ด๋‚˜๋ฉด ๋‹คํ–‰์ด๊ฒ ์ง€๋งŒ, ํ•ญ์ƒ ์กฐ๊ธˆ๋งŒ ๋” ์ž๋ ค๋Š” ๋งˆ์Œ ๋•Œ๋ฌธ์— ๋งค์ผ ํ•™๊ต๋ฅผ ์ง€๊ฐํ•˜๊ณ  ์žˆ๋‹ค. ์ƒ๊ทผ์ด๋Š” ๋ชจ๋“  ๋ฐฉ๋ฒ•์„ ๋™์›ํ•ด๋ณด์•˜์ง€๋งŒ,

www.acmicpc.net

 

h, m = map(int, input().split())
if 45 <= m:
    m2 = m - 45
if m < 45:
    if h==0:
        h=23
    else:
        h = h - 1
    m2 = 60 - (45-m)
print(h, end=" ")
print(m2)
728x90

':: Python ๐Ÿšฉ > ์•Œ๊ณ ๋ฆฌ์ฆ˜' ์นดํ…Œ๊ณ ๋ฆฌ์˜ ๋‹ค๋ฅธ ๊ธ€

BFS & DFS  (1) 2023.02.16
[์ฝ”๋”ฉ] [๋ฐฑ์ค€ 14681 python]  (0) 2023.01.19
[์ฝ”๋”ฉ] [๋ฐฑ์ค€ 10808 python]  (0) 2023.01.19

๋Œ“๊ธ€