#Z15105. 年龄与疾病

年龄与疾病

Description

A hospital wants to analyze whether the occurrence of a certain disease is related to age. They need to organize past diagnosis 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 ages 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, for a total of four lines.

Example Output Format

25.00%
25.00%
25.00%
25.00%

(Note: The example shows equal distribution for illustration. Actual output depends on input data.)

10
1 11 21 31 41 51 61 71 81 91

20.00%
20.00%
20.00%
40.00%