Given N characters C1,… CN, each denoting one vote for the corresponding candidate, determine the number of votes received by each candidate, as well as the number of spoiled ballots.
Votes for valid candidates in the election are denoted by the letters 'A' through 'F', inclusive. Any other character represents a spoiled ballot.
InputThe first line contains a single integer N (1 ≤ N ≤ 1000).
The following N lines each contain a single character Ci, representing one vote.
OutputLines 1..6 should each contain one integer, the number of votes that candidates A…F, respectively, received in the election. Line 7 should also contain one integer, the number of spoiled ballots.
5 A B C B %
1 2 1 0 0 0 1
Point Value: 4
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 29, 2008
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3