HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


023. 50437 - Age Labeling

Guest
• Review clarifications (1)

Volume problems

• 017. 50537 - esreveR Triangle
• 018. 50344 - Profit or Loss
• 018. 50491 - Brokers
• 018. 50787 - Expected Value
• 019. 50438 - Pattern with stars
• 020. 50485 - Center of gravity of a ...
• 020. 50408 - Molecules
• 022. 50366 - Student Averages (2 G...
• 023. 50437 - Age Labeling
• 024. 50372 - Number Quadruplets
• 025- 2013-Nov-01. 50328 - How far ...
• 026. 50399 - Mobile Base Station
• 026. 50487 - Radius of Inscribed Circle
• 027. 50548 - Albanian Airlines
• 028. 50483 - Group Total
• 030. 50584 - Total invoice amount
• 033. 50588 - Processing the list of n...

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