KAMIL - Kamil

no tags 

Some kids cannot pronounce all letters, some of them they sometimes pronounce correctly and sometimes incorrectly. Kamil sometimes says T instead of K, but he never says K instead of T. Similarly he sometimes says D instead of G. Instead of R he sometimes says L and sometimes F. Of course it happens that he pronounces the letter correctly. Kamil's father always thinks how many words can mean the word spoken by his son (it doesn't matter if they are real English words).


Write a program which

  • reads from standard input the words spoken by Kamil
  • counts how many different words can that mean
  • writes the outcome on standard output



Ten test cases (given one under another, you have to process all!). Every test case is a single line - a word spoken by Kamil. Only 26 capital leters are used. The length of the word is at most 20.


For every testcase write an integer in a single line with a single integer, denoting the number of words which Kamil's word can mean.


The score awarded to your program is the number of bytes the source code you submit. The fewer points you score, the better. Submissions are not allowed to exceed 256 bytes.

Remark. It may turn out impossible to solve this problem in some languages.


[and 9 test cases more]

[and 9 test cases more]

hide comments
Hermano: 2011-05-26 18:50:39

So I can Assume if he said d he could have said g, and vice-versa?

Or if he said g, he really meant to say g?

rauh: 2011-05-09 11:00:16

it is possible with c++

ravi ranjan: 2011-02-22 05:32:09

output seems always to be in the form of 2^2,2^3,2^4,2^5......

sathiya: 2011-02-18 15:56:05

more test cases please

Last edit: 2011-02-18 15:58:22
hemezh: 2010-10-29 19:04:39

some more test cases please!!!

Radek: 2010-10-27 13:06:43

could someone deliver some more tests, please?

Last edit: 2011-03-10 09:23:19
vanathi: 2010-10-03 16:41:21

is it possible to do with c++??????????

no~problem: 2010-08-18 21:12:31

note:"says T instead of K, but never says K instead of T"

Last edit: 2010-08-19 12:36:59

Added by:Adam Dzedzej
Time limit:3s
Source limit:256B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Resource:Internet Contest Pogromcy Algorytmow (Algorithm Tamers) Round I, 2003