Submit | All submissions | Best solutions | Back to list |
KAMIL - Kamil |
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).
Task
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
Input
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.
Output
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.
Score
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.
Example
Input: FILIPEK [and 9 test cases more] Output: 4 [and 9 test cases more]
Added by: | Adam Dzedzej |
Date: | 2004-06-08 |
Time limit: | 3s |
Source limit: | 256B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: NODEJS OBJC PERL6 SQLITE VB.NET |
Resource: | Internet Contest Pogromcy Algorytmow (Algorithm Tamers) Round I, 2003 |
hide comments
|
||||||||||||||
2015-12-13 05:02:08 Prakhar Dev Gupta
140 :( |
||||||||||||||
2015-12-13 04:53:54 Prakhar Dev Gupta
Why 4 ?? We can only replace the last 'K' in the given test case isn't it? It appears from the question that we dont have to replace F and L . |
||||||||||||||
2015-10-02 01:01:06
getchar can be used to make it even shorter (c++) |
||||||||||||||
2015-09-29 20:40:21
97.. just not good enough :( EDIT: Now, reached 70 in python and 32 in ruby. Happy :) Last edit: 2015-10-06 18:58:07 |
||||||||||||||
2015-09-29 02:49:53
Finally! Tnks Python *-* @vardhanharsh Use PYTHON =D Last edit: 2015-09-29 02:51:15 |
||||||||||||||
2015-08-19 15:47:46
exceeding source limit . what to do ? Code in C# |
||||||||||||||
2015-07-18 08:39:38
WORKS FINE LOCALLY BUT THROWS A RUNTIME ERROR HERE |
||||||||||||||
2015-06-23 15:51:07
Can someone help me out... I am getting a compilation error while submission.. but when I compiling the code in other compiler there is no compilation error. |
||||||||||||||
2015-05-28 16:19:54 Mayank
85...happy :) |
||||||||||||||
2015-02-21 12:42:41 arun m dabbe
o/p is 4 because here condition is given that *for R he sometimes says L and **sometimes(means not always) F. so filipek can become firipek rilipek riripek and filipek which counts to 4. |