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.