[20251113] PGM / Lv2 / 주차 요금 계산 / 이강현 #1398
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🧷 문제 링크
https://school.programmers.co.kr/learn/courses/30/lessons/92341
🧭 풀이 시간
40분
👀 체감 난이도
✏️ 문제 설명
차량의 입차시간 출차시간이 주어짐.
기본 시간과 기본 요금이 있고 이후에는 단위 시간당 추가요금이 발생.
차량당 총 요금을 출력.
🔍 풀이 방법
구현
입차 기록이 없으면 그냥 넣고 있으면 그거랑 비교해서 시간 저장해둠.
시간으로 비용 계산
⏳ 회고
다음에 또 중복으로 들어오는 경우를 고려하지 않아서 틀렸다.
나는 이런 구현문제가 자꾸 헷갈려서 큰일이다.