[프로그래머스] 달리기 경주
def solution(players, callings): # {'mumu': 0, 'soe': 1, 'poe': 2, 'kai': 3, 'mine': 4} player_dict = {player:rank for rank,player in enumerate(players)} # {0: 'mumu', 1: 'soe', 2: 'poe', 3: 'kai', 4: 'mine'} rank_dict = {rank:player for rank,player in enumerate(players)} for call in callings: call_index = player_dict[call] prev_index = call_index -1 player_dict[rank_dict[call_index]], player_di..
2023. 6. 23.