Flying Plushies

View as PDF

Submit solution


Points: 3 (partial)
Time limit: 2.0s
Memory limit: 16M

Authors:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
Junior 1 — Flying Plushies

Griffy is flying to Don Mills CI to make friends (after Glenforest's defeat in ECOO)! Griffy would like to fly at exactly N meters off the ground (the most relaxing height). However, Don Mills (being a weird school) recently installed M giant cat girl plushies in a line (right on Griffy's course too!). Each plushie i has a height of H_{i}, and spans from the ground to its height inclusive. Determine how many plushies Griffy will fly into, assuming he will fly in a straight line at a constant height.

Input Specification

The first line will contain a single integer N (1 \le N \le 200).

The second line will contain a single integer M (1 \le M \le 200).

The next M lines will contain values of H_{i} (1 \le H_{i} \le 400).

Output Specification

Output one line, the number of plushies that Griffy will fly into.

Sample Input

5
3
1
7
5

Sample Output

2

Comments


  • -4
    showme  commented on Sept. 18, 2020, 8:59 p.m.

    I think this question is a little easy if you are doing it with python 3.