#K89167. Count Top Performers

    ID: 37471 Type: Default 1000ms 256MiB

Count Top Performers

Count Top Performers

You are given the number of participants n and a threshold score t. Additionally, a list of n integer scores is provided. Your task is to determine the number of participants whose scores are greater than or equal to the threshold t. For example, if t = 50 and the scores are [60, 45, 70, 55, 90], then 4 participants have scores no less than 50.

The problem can be formalized as follows: Given an integer \( n \) (the number of participants), an integer \( t \) (the threshold), and a list \( S = [s_1, s_2, \dots, s_n] \) where each \( s_i \) is a participant's score, compute the value:

[ \text{result} = |{ s_i \in S : s_i \ge t }| ]

Return the computed result.

inputFormat

The input is given via standard input (stdin). The first line contains two integers n and t (the threshold), separated by space. The second line contains n space-separated integers representing the scores of each participant.

outputFormat

Output a single integer on a new line (stdout), which is the number of participants whose score is greater than or equal to the threshold.## sample

5 50
60 45 70 55 90
4

</p>