본문 바로가기
Algorithm

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

by 가영리 2022. 1. 14.
728x90

코드

import sys

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

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

arr.sort()

print(arr[k-1])

 

입출력