본문 바로가기
💻 하나씩 차곡차곡/프로그래머스 (Python)

[프로그래머스/Lv.1/Python/해시] 완주하지 못한 선수

by 뚜루리 2024. 1. 5.
728x90
320x100
def solution(participant, completion):
    # 정렬
    participant.sort()
    completion.sort()
    
    for i in range(len(completion)):
        if participant[i] != completion[i]:
            return participant[i]
        
    return participant[-1]

아니 겁나 간단해보이는데 왜케 안풀리는 거임 진짜 별거 아닌걸로 개고생했네 진짜 하 자괴감 오져

728x90
320x100