Ga0Lee

[알고리즘] K번째 수 백준 11004 (Python) 본문

Algorithm

[알고리즘] K번째 수 백준 11004 (Python)

가영리 2022. 1. 14. 01:24

코드

import sys

n, k = map(int, input().split())

arr = list(map(int,input().split()))

arr.sort()

print(arr[k-1])

 

입출력