All problems

A Seaborn Histogram With histplot

easyPythonSeabornhistplot

Calder Health records how many minutes each patient waited before being seen. The clinic's chart cuts the waits into buckets ten minutes wide and shows how many patients landed in each. The board only ever asks about the first bucket, because a wait under ten minutes is the target and everything else is a conversation.

Task: Print how many waits fall in the first bucket.

Input

The first line holds one integer n, the number of patients. Each of the next n lines holds one wait in minutes, a number on its own. A wait may come out negative when a clock was set wrong.

Output

One line holding a single whole number: how many waits are at least 0 and less than 10. A wait of exactly 10 belongs to the next bucket, not this one; a wait of exactly 0 belongs to this one. Print 0 when the bucket is empty.

A quiet hour can leave a batch of one patient, or a batch whose waits all sit within a few minutes of each other. The chart is one bucket wide in that case, which is still a chart and still an answer: report the count in the same format, with no special message and no error.

Example:

Input:
5
2
15
8
25
3

Output:
3

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…