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
nyarlathotep: 2016-07-07 14:21:24

194 bytes in C, I should go kill myself :D

danielphillips: 2016-07-03 00:05:28

221 in CPP. I think I can do better!

fly_sky12: 2016-06-28 08:44:09

193 bytes in C

psushaanth23: 2016-06-18 20:28:48

Could manage a best of 208 bytes in cpp by compressing everything into 2 lines.

harshit23897: 2016-06-16 18:07:12


meettaraviya: 2016-06-15 22:16:19

83 in python!!

vicky: 2016-06-15 13:42:23

CPP... 169 bytes 2 lines

alecsey: 2016-05-27 17:45:20

239 in java =)

yash__: 2016-04-29 01:51:35

This problem made me realize why I fell in love with python. Took 10 minutes and 89 bytes :)

sharath_111: 2016-01-30 19:50:40

CPP 220 using getchar :(

Added by:Adam Dzedzej
Time limit:3s
Source limit:256B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: NODEJS objc PERL 6 VB.net
Resource:Internet Contest Pogromcy Algorytmow (Algorithm Tamers) Round I, 2003