QOJ.ac

QOJ

时间限制: 2 s 内存限制: 1024 MB

#23975. 大楼 5

统计

题目描述

JOI 国有 $N$ 栋大楼。第 $i$ 栋($1 \le i \le N$)大楼的高度为 $H_i$ 米。

请求出这些大楼中,高度不少于 $X$ 米的有多少栋。

数据范围

  • $1 \le N \le 100$。
  • $1 \le X \le 1000$。
  • $1 \le H_i \le 1000$($1 \le i \le N$)。
  • 输入的所有值均为整数。

输入格式

输入按以下格式给出:

N X
H_1 H_2 ... H_N

输出格式

输出高度在 $X$ 米以上的大楼数量,省略单位(栋)。

除答案外不要输出任何内容。(也不要输出提示输入的文字等。)

关于输出格式,你也可以参考练习题及其解答示例。


样例输入 $1$

3 20
18 25 20

样例输出 $1$

2

JOI 国有 $3$ 栋大楼,各自的高度分别为 $18$ 米、$25$ 米、$20$ 米。

其中,高度在 $20$ 米以上的大楼有 $2$ 栋。因此输出 $2$。


样例输入 $2$

4 10
3 9 1 3

样例输出 $2$

0

JOI 国有 $4$ 栋大楼,各自的高度分别为 $3$ 米、$9$ 米、$1$ 米、$3$ 米。

其中,不存在高度在 $10$ 米以上的大楼。因此输出 $0$。


样例输入 $3$

1 100
100

样例输出 $3$

1

样例输入 $4$

5 634
829 679 632 601 600

样例输出 $4$

2

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.