Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 백준2525
- F-string
- 백준
- 백준1181
- javascript
- 코딩테스트
- 큐
- 백준25305
- 백준2587
- 제주ICT
- 코테
- 컴프리헨션
- 백준1247
- 백준2751
- 백준1284
- 이터레이터
- 제주코딩베이스캠프
- 파이썬
- 위니브
- 백준1312
- 백준 10814
- Python
- 백준10757
- 자료구조
- 더오름
- 백준10039
- 개발자
- 코테준비
- collections
- 왈러스 연산자
Archives
- Today
- Total
목록백준2525 (1)
hyei-devlog

📍 문제https://www.acmicpc.net/problem/2525 📍 전체 코드h, m = map(int, input().split())cook_m = int(input())h += cook_m // 60m += cook_m % 60if m >= 60: h += 1 m -= 60if h >= 24: h -= 24print(h, m) 📍 문제 풀이주어진 시간 (h, m)에 추가로 주어진 분(cook_m)을 더한 후, 24시간제에 맞게 조정하는 문제이다. 1. 시간과 분을 더하기cook_m // 60 # → 추가할 시간 계산cook_m % 60 # → 추가할 분 계산 2. 분(m)이 60 이상이면 시(h) 증가시키기 if m >= 60: # m >= 60이면 h +1, m - 6..
Online Judge/Baekjoon
2025. 2. 1. 23:36