본문 바로가기

IT/알고리즘

[1day 1 solve , 20/07/07] 프로그래머스 크레인 인형 뽑기 lv2

https://programmers.co.kr/learn/courses/30/lessons/42576?language=python3

 

 

import collections


def solution(participant, completion):
    print(collections.Counter(participant))
    print(collections.Counter(completion))
    answer = collections.Counter(participant) - collections.Counter(completion)
    
    return list(answer.keys())[0]