DWITE Online Computer Programming Contest
November 2002

Problem 5

Now I know my ABCs

You are to determine the frequency of each letter of the alphabet in a line of characters.

Input

The input will contain five lines of data. Each line will contain at most 255 characters.

Output

The output will contain five lines of data, each displaying the frequency of the letters of the alphabet, in alpabetical order, from the corresponding lines of the input file. Display only those letters that occurred at least once. Separate the letter from the frequency with a hyphen and follow the frequency with a colon (except the last one).

Sample Input

(2 lines only)

This sentence has 4 t's in it.
And this one only has one.
...

Sample Output

A-1:C-1:E-3:H-2:I-3:N-3:S-4:T-4
A-2:D-1:E-2:H-2:I-1:L-1:N-4:O-3:S-2:T-1:Y-1
...

All Submissions
Best Solutions


Point Value: 5
Time Limit: 1.00s
Memory Limit: 32M
Added: Mar 25, 2009

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

It's quiet in here...