#C14195. Count Employees by Age Group

    ID: 43817 Type: Default 1000ms 256MiB

Count Employees by Age Group

Count Employees by Age Group

Given a list of ages of employees, your task is to count the number of employees in each age group. The age groups are defined in ranges of 10: [0,9], [10,19], [20,29], ..., [100,109]. Use the formula \(\lfloor \frac{age}{10} \rfloor\) to determine the appropriate group for a valid age (where \(0 \leq age \leq 100\)).

For example, if the input is 5 25 25 45 100, then there is 1 employee in group [0,9], 0 in [10,19], 2 in [20,29], 0 in [30,39], 1 in [40,49], and 1 in [100,109]. Your program should read input from stdin and output the result to stdout as 11 space-separated integers representing these counts.

inputFormat

The input is given as:

  1. An integer n (0 \(\leq n \leq 10^6\)) on the first line, representing the number of employees.
  2. The second line contains n space-separated integers, where each integer represents the age of an employee.

Note that only ages between 0 and 100 (inclusive) are considered valid for counting.

outputFormat

Output a single line to stdout containing 11 space-separated integers. Each integer corresponds to the count of employees whose ages fall into the groups: [0,9], [10,19], [20,29], ..., [100,109], respectively.

## sample
0
0 0 0 0 0 0 0 0 0 0 0