defaultdict
-
[프로그래머스] - 주차 요금 계산Algorithm/프로그래머스 2022. 8. 9. 22:13
문제 [프로그래머스] - 주차 요금 계산 https://school.programmers.co.kr/learn/courses/30/lessons/92341 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 문제 이해 더보기 문제 설명 주차장의 요금표와 차량이 들어오고(입차) 나간(출차) 기록이 주어졌을 때, 차량별로 주차 요금을 계산하려고 합니다. 아래는 하나의 예시를 나타냅니다. 요금표 기본 시간(분)기본 요금(원)단위 시간(분)단위 요금(원) 180 5000 10 600 입/출차 기록 시각(시:분)차량 번호내역 05:34 5961 입차 06:00 0000..
-
[Python] - Dictionary개발/Python 2022. 7. 27. 12:17
Dictionary type is immutable key and mutable value mapping not sorted set No index , so access the key Syntax # Default type {"a" : 1, "b":2} e = {} f = dict() newdict = dict( alice = 5, bob = 20, tony= 15, suzy = 30) Key is not allowed mutable key like list , set , dict # Error case a = { {1, 3}: 5, {3,5}: 3} #set a = {[1,3]: 5, [3,5]: 3} #list a = { {"a":1}: 5, "abc": 3} #dict # Key immuttable..