반응형
문제 설명
https://www.acmicpc.net/problem/2525
제출한 코드
a,b=input().split()
a=int(a)
b=int(b)
c =int(input())
d=b+c
while d>59 :
if d>59 :
if a==23:
a=0
d-=60
else:
a+=1
d-=60
print(a,d)
결과

후기
반응형
'BQJ 백준 > python' 카테고리의 다른 글
[Python/파이썬] 백준 2557번: Hello World (0) | 2024.06.21 |
---|---|
[Python/파이썬] 백준 2530번: 인공지능 시계 (0) | 2024.06.21 |
[Python/파이썬] 백준 2480번: 주사위 세개 (0) | 2024.06.20 |
[Python/파이썬] 백준 2475번: 검증수 (0) | 2024.06.20 |
[Python/파이썬] 백준 2455번: 지능형 기차 (0) | 2024.06.20 |