QOJ.ac

QOJ

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

#23975. Edifici 5

统计

Testo del problema

Nel Regno di JOI ci sono $N$ edifici. L'altezza dell'$i$-esimo edificio ($1 \le i \le N$) è di $H_i$ metri.

Trova quanti di questi edifici hanno un'altezza pari o superiore a $X$ metri.

Vincoli

  • $1 \le N \le 100$.
  • $1 \le X \le 1000$.
  • $1 \le H_i \le 1000$ ($1 \le i \le N$).
  • Tutti i valori in input sono numeri interi.

Input

L'input è fornito nel seguente formato:

N X
H_1 H_2 ... H_N

Output

Stampa il numero di edifici la cui altezza è almeno $X$ metri, omettendo l'unità di misura.

Non stampare nient'altro oltre alla risposta. (Non stampare frasi che richiedono l'input, ecc.)

Per il formato della risposta puoi anche fare riferimento ai problemi di allenamento e relativi esempi di soluzione.


Esempio di Input $1$

3 20
18 25 20

Esempio di Output $1$

2

Nel Regno di JOI ci sono $3$ edifici, e le loro altezze sono rispettivamente $18$ metri, $25$ metri e $20$ metri.

Tra questi, ci sono $2$ edifici con un'altezza di almeno $20$ metri. Pertanto si stampa $2$.


Esempio di Input $2$

4 10
3 9 1 3

Esempio di Output $2$

0

Nel Regno di JOI ci sono $4$ edifici, e le loro altezze sono rispettivamente $3$ metri, $9$ metri, $1$ metro e $3$ metri.

Tra questi, non esiste alcun edificio con un'altezza di almeno $10$ metri. Pertanto si stampa $0$.


Esempio di Input $3$

1 100
100

Esempio di Output $3$

1

Esempio di Input $4$

5 634
829 679 632 601 600

Esempio di Output $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.