Skip to content
This repository was archived by the owner on Mar 18, 2024. It is now read-only.

[2023-09-06] sumin #182 #197

Merged
merged 1 commit into from
Sep 7, 2023
Merged

[2023-09-06] sumin #182 #197

merged 1 commit into from
Sep 7, 2023

Conversation

ksumini
Copy link
Contributor

@ksumini ksumini commented Sep 6, 2023

PR Summary

풀이시간: 20분

<input>

  • fees: 주차 요금 (fees의 길이 = 4)

    • fees[0]: 기본 시간(분)
    • fees[1]: 기본 요금(원)
    • fees[2]: 단위 시간(분)
    • fees[3]: 단위 요금(원)
  • records: 자동차의 입/출차 내역 (1 ≤ records의 길이 ≤ 1,000)

    • 시각, 차량번호, 내역

<solution>

  • 단순 구현!!

<시간 복잡도>
O(NlogN): 전체 코드 중 정렬이 가장 많은 시간 소요됨

@ksumini ksumini requested a review from Woo-Yeol as a code owner September 6, 2023 03:11
@ksumini ksumini self-assigned this Sep 6, 2023
@ksumini ksumini requested a review from zsmalla as a code owner September 6, 2023 03:11
@ksumini ksumini linked an issue Sep 6, 2023 that may be closed by this pull request
Copy link
Member

@Woo-Yeol Woo-Yeol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

전체적으로 깔끔한 풀이를 볼 수 있어서 좋았습니다! 고생하셨습니다 수민님! 추가적으로 datetime 모듈을 사용해서 시간 차이를 구하는 방법도 있으니 확인해보셔도 좋을 것 같아요!

Copy link
Contributor

@zsmalla zsmalla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{차량번호 : 입차내역리스트}를 활용하신 점이 너무 좋았던 풀이였습니다. 훨씬 직관적으로 이해가 가능했던 것 같아요. 고생하셨습니다 수민님!

Copy link
Contributor

@limstonestone limstonestone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

입출차 시간을 pop() 연산으로 처리한 것 빼고는 제 풀이와 거의 똑같은것 같아요!
변수를 따로 선언해서 while 문 내 조건과 pop 연산으로 해결하니 조금 더 직관적인 것 같다는 느낌이 듭니다!
감사합니다 ~~!

@ksumini ksumini merged commit 204998c into main Sep 7, 2023
@ksumini ksumini deleted the sumin-#182 branch September 7, 2023 10:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Programmers] 주차 요금 계산
4 participants