Số lớn thứ k

View as PDF

Submit solution

Points: 100.00 (partial)
Time limit: 1.0s
Memory limit: 64M
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C++, GAS64, Pascal, Perl, PHP, Python, Sed, TCL, Text

Cho một dãy gồm N số nguyên dương A1,A2,,AN.(N104,Ai109) và số K (KN). Hãy in ra số lớn thứ K trong dãy.

Input

  • Dòng đầu chứa số N,K,
  • Dòng thứ hai chứa N số nguyên dương A1,A2,,AN.

Output

  • Một dòng chứa dãy số lớn thứ K trong dãy.

Input

Copy
6 2    
91 451 43 3 452 54

Output

Copy
451

Comments

Please read the guidelines before commenting.