#abc222b. B - Failing Grade

B - Failing Grade

Score : 200200 points

问题描述

设有 NN 名学生参加了考试。这些学生被标记为学生 11、学生 22\dots、学生 NN,其中学生 ii 得分为 aia_i 分。

若一名学生的得分少于 PP 分,则认为该生未能通过考试,不能获得学分。请找出未能通过考试的学生人数。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

NN students took an exam. The students are labeled as Student 11, Student 22, \dots, Student NN, and Student ii scored aia_i points.

A student who scored less than PP points are considered to have failed the exam and cannot earn the credit. Find the number of students who failed the exam.

Constraints

  • 1N1051 \leq N \leq 10^5
  • 1P1001 \leq P \leq 100
  • 0ai1000 \leq a_i \leq 100 (1iN)(1 \leq i \leq N)
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN PP

a1a_1 a2a_2 \dots aNa_N

Output

Print the number of students who failed the exam.

Sample Input 1

4 50
80 60 40 0

Sample Output 1

2

Students 11 and 22, who scored 8080 and 6060 points, respectively, succeeded in scoring at least 5050 points to earn the credit.
On the other hand, Students 33 and 44, who scored 4040 and 00 points, respectively, fell below 5050 points and failed the exam. Thus, the answer is 22.

Sample Input 2

3 90
89 89 89

Sample Output 2

3

Sample Input 3

2 22
6 37

Sample Output 3

1

update @ 2024/3/10 09:46:18