11004
-
[백준] 11004 k번째 수백준 Online Judge 2021. 8. 31. 17:14
문제 해설 n개의 수를 오름차순으로 정렬 한 뒤, k 번째 수를 찾아라. 시간 복잡도 o(NlogN)의 정렬 알고리즘을 이용한다. 11004번: K번째 수 수 N개 A1, A2, ..., AN이 주어진다. A를 오름차순 정렬했을 때, 앞에서부터 K번째 있는 수를 구하는 프로그램을 작성하시오. www.acmicpc.net n, k = map(int, input().split()) array = list(map(int, input().split())) array = sorted(array) print(array[k-1]) GitHub - DAWUNHAN/Algorithms-and-DataStructure: Algorithms and DataStructure with Python Algorithms and D..