|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).
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.
Input: FILIPEK [and 9 test cases more] Output: 4 [and 9 test cases more]
|Added by:||Adam Dzedzej|
|Cluster:||Cube (Intel G860)|
|Languages:||All except: NODEJS OBJC PERL6 SCM qobi SQLITE VB.NET|
|Resource:||Internet Contest Pogromcy Algorytmow (Algorithm Tamers) Round I, 2003|
2012-03-05 13:39:03 challenger
Simple program but I have no idea how to get rid of that one char. :-)
You deserve the 1st place, so I'm glad You decided to use the dirty trick. :-)
2012-03-05 13:27:04 Hallvard Norheim Bø
Taste defeat, challenger! ;)
2012-02-26 20:53:19 Hallvard Norheim Bø
Could somebody please fix this challenge so embedded solutions are no longer possible?
2011-07-11 22:02:39 Piotr KÄ…kol
It's not my task so I'm not able to do it and some "old" authors don't visit SPOJ anymore (as You may see here - last submission in 2007).
2011-07-11 13:31:01 Hallvard Norheim Bø
Wouldn't it be better to fix the tests?
2011-07-11 06:13:31 Piotr KÄ…kol
What do You mean by real?
Hint: This task has weak tests. Cheating trick is used in the shortest code in Python.
2011-07-10 01:39:28 Hallvard Norheim Bø
47 bytes of Python?!? Is this a real solution?