#4924. Counting Passes

0
    ID: 4924 传统题 2000ms 1024MiB 尝试: 0 已通过: 0 难度: 1 上传者: 标签>AtCoderabc330AGESP 1级枚举(单层循环)分支结构

Counting Passes

Counting Passes

题目描述

NN people labeled 1,2,…,N1,2,\dots,N took an exam, and person ii scored AiA_i points.
Only those who scored at least LL points pass this exam.
Determine how many people out of the NN have passed the exam.

输入格式

The input is given from Standard Input in the following format: NN LL A1A_1 A2A_2 …\dots ANA_N

输出格式

Print the answer as an integer.

5 60
60 20 100 90 40
3
4 80
79 78 77 76
0
10 50
31 41 59 26 53 58 97 93 23 84
6

提示

All input values are integers. 1≤N≤1001 \le N \le 100 1≤L≤10001 \le L \le 1000 0≤Ai≤10000 \le A_i \le 1000Five people took the exam. You need to score at least 6060 points to pass.

Person 11 scored 6060 points, so they passed. Person 22 scored 2020 points, so they did not pass. Person 33 scored 100100 points, so they passed. Person 44 scored 9090 points, so they passed. Person 55 scored 4040 points, so they did not pass.

From the above, we can see that three people have passed.
There may be cases no one has passed.

标签: AtCoder|abc330A

来源

AtCoder|abc330A