<jupyter_start><jupyter_text>2021년 2월 12일 금요일 Programmers - 2019 KAKAO BLIND RECURITMENT 실패율 (Python) 문제 : https://programmers.co.kr/learn/courses/30/lessons/42889 블로그 : https://somjang.tistory.com/entry/Programmers-2019-KAKAO-BLIND-RECRUITMENT-%EC%8B%A4%ED%8C%A8%EC%9C%A8-Python  첫번째 시도<jupyter_code>from collections import Counter

def solution(N, stages):
    answer = []
    
    fail_percent = {}
    
    num_of_people = len(stages)
    
    for i in range(1, N+1):
        count = stages.count(i)
        if num_of_people == 0:
            fail_percent[i] = 0
        else:
            fail_percent[i] = count / num_of_people
        
        num_of_people = num_of_people - count
        
    answer = [stage[0] for stage in sorted(fail_percent.items(), key=lambda x: (-x[1], x[0]))]    
    
    return answer<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1214622641509434, 'fraction_numerical': 0.041273584905660375, 'mean_word_length': 2.7733333333333334, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '345764', 'license': 'MIT', 'n_tokens_mistral': 355, 'n_tokens_neox': 348, 'n_words': 58, 'path': 'DAY 301 ~ 400/DAY318_[Programmers] 2019 KAKAO BLIND RECRUITMENT 실패율 (Python).ipynb', 'repo_name': 'SOMJANG/CODINGTEST_PRACTICE', 'size': '848'}