글 작성 제목과 내용을 간결하게 정리해 주세요. 제목 내용 <pre><code class="language-python">import sys input = sys.stdin.readline cntDic = {} # {숫자 : 갯수} 딕셔너리 n = int(input()) for i in range(n): num = int(input()) if num not in cntDic: # 아직 키가 아니면 cntDic[num] = 1 # 1 else: # 이미 키가 있으면 cntDic[num] += 1 # +1 result = sorted(cntDic.items(), key=lambda x: x[0]) # 먼저 키로 정렬 result = sorted(result, key=lambda x: x[1], reverse=True) # 값 내림차순으로 정렬 print(result[0][0]) # 가장 앞의 값 출력 </code></pre> 글 종류 이론 정리 알고리즘 이론에 대한 정리글입니다. 문제 풀이 알고리즘 문제 풀이입니다. 알고리즘 분류 수정 취소