한 줄에 여러값 입력 받을 때 정렬하지 않고 받아서 탐색시간 감소하려면
list(map(int,input().split())) 대신에
set(map(int,input().split()))
'코딩테스트 > Python 개념' 카테고리의 다른 글
| [Python] 평균, 중앙값 numpy (0) | 2023.01.05 |
|---|---|
| [Python] 리스트에 요소 삽입 (append, insert, extend) (0) | 2022.11.03 |
| [Python] 유사 딕셔너리 defaultfict() (0) | 2022.08.21 |
| [Python] 순열/조합 , 중복 순열/중복 조합 (0) | 2022.08.12 |
| [Python] heapq 모듈 (0) | 2022.07.26 |