Spongebob is having a cryptography lesson today! Today's lesson is about substitution cipher (http://en.wikipedia.org/wiki/Substitution_cipher), which is a method of encryption whereby every alphabet is replaced by another alphabet.
Cracking a code encrypted by substitution is rather easy due to the flaws of the English Language. This is because certain letters are more frequently used than others. For example: E is used 11% of the time while Q is only used 0.2%.
As such, Spongebob's teacher, wants spongebob to investigate the frequency of letters of the language used in Bikini-Bottom. However, there might be thousands of letters, making it very boring for Spongebob to count one by one.
Create a program that count the number of time every letter appears.
Subtask | Score |
---|---|
1 | 100 |
2 | 0 |