주차 요금 계산
-
[프로그래머스][2022 KAKAO BLIND RECRUITMENT][Kotlin]주차 요금 계산프로그래머스 2022. 9. 26. 10:43
class Solution { fun solution(fees: IntArray, records: Array): IntArray { var answer: IntArray = intArrayOf() var tempRecords = records.toMutableList() var carParkingTime = mutableMapOf() for(i in 0 .. tempRecords.size-1){ if(tempRecords[i].split(" ")[2] == "IN"){ var count = 0 for( j in i+1 .. tempRecords.size-1){ if(tempRecords[i].split(" ")[1] == tempRecords[j].split(" ")[1] && tempRecords[j]..