[BOJ 9777] Birthday Statistics
View as PDF
Submit solution
Assembly, Awk, C, C++, Java, Pascal, Perl, Python, Sed, Text
Points:
1
Time limit:
1.0s
Memory limit:
128M
Problem types
Allowed languages
In a company, the birthdays of all employees are collected. Your task is to write a program to summarize the number of people that were born in each month.
입력 형식
The first line of the input contains a positive integer n (1 ≤ n ≤ 5,000) which is the number of employees. The n following lines contain the ID (4-digit number) of each employee and his/her birth date. The birth date is written in this particular format: day/month/year.</p>
Suppose that all dates in the input are valid dates.
출력 형식
Print out the number of month (1-12) and the number of employees born in that month.
예제 입력
10
1000 1/2/1967
1012 13/10/1940
1103 5/1/1965
2012 16/7/1980
1125 18/9/1979
1235 10/10/1976
1400 16/11/1973
1013 5/1/1965
2109 28/7/1958
2155 10/12/1970
예제 출력
1 2
2 1
3 0
4 0
5 0
6 0
7 2
8 0
9 1
10 2
11 1
12 1
Comments