#T551. 年龄与疾病

年龄与疾病

Description

A hospital wants to analyze whether the occurrence of a certain disease is related to age. They need to organize past diagnostic records and calculate the proportion of patients in four age groups: 0-18, 19-35, 36-60, and 61 or above (inclusive), relative to the total number of patients.

Input Format

There are 2 lines of input:

  • The first line contains the number of past patients, n (0 < n ≤ 100).
  • The second line lists the age of each patient at the time of diagnosis.

Output Format

Output the proportion of patients in each of the four age groups (0-18, 19-35, 36-60, and 61 or above) as a percentage of the total number of patients. The results should be displayed with two decimal places of precision. Each age group should be printed on a separate line, totaling four lines.

10
1 11 21 31 41 51 61 71 81 91
20.00%
20.00%
20.00%
40.00%
## Source

CodesOnline