HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > CEN111 Homeworks 2013-2015 > problem:


14-Spr2-50. 50437 - Age Labeling

CEN111 Homeworks 2013-2015

Start: Jan.10.2015 at 10:00:00 AM
Finish: Jan.10.2015 at 03:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (1)

Contest problems

• 14-Fall2-30. 50523 - Total Tax to Pay
• 14-Fall2-40. 50514 - Bookkeeping
• 14-Fall2-50. 50534 - Top Trading C...
• 14-Fall2-60. 50487 - Radius of Inscr...
• 14-FallResit-20. 50407 - Missing Nu...
• 14-Spr2-10. 50426 - Calculating Sales
• 14-Spr2-20. 50425 - Calculating W...
• 14-Spr2-30. 50445 - Cryptography
• 14-Spr2-50. 50437 - Age Labeling
• 15-FallHW-2. 50821 - Derivative of ...
• 15-FallHW-3. 50822 - Linked List
• 15-FallHW-4. 50823 - Secret Number
• 15-FallHW-5. 50824 - Sum of Group...
• 15-FallHW-6. 50825 - Drawing Polygon
• 15-FallPr-10. 50808 - Total Distance...
• 15-FallPr-50. 50812 - Total Discount...
• 15-FallPr-70. 50814 - Buying Books f...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Erisa Terolli.

Age Labeling

A chocolate company is going to make a survey and find out the number of people from different age ranges who buy their products. The age ranges are as follows:

  • 0 - 10 years old
  • 11 - 20 years old
  • 21 - 30 years old
  • Over 30 years old

Question:
Write a program that takes the ages of n people (customers of chocolate company) and print the number of people for each age range.

Input specification
First you will be given an integer number (n) where 1 ≤ n ≤ 100. The in the following n lines you will be given the ages of n people.

Output specification
Print a list of 4 integers that indicate number of people from each age range.

 Sample Input I   
 5
 5
 12
 15
 23
 30
 Sample Output I   
 1 2 2 0


Для отправки решений необходимо выполнить вход.

www.contester.ru