One beautiful morning, Mr. Tomato decided to create a new account ID on PTT2. By the time he typed his ID, there came the truble, the ID "tmt514" has been applied! He was really depressed about this, and get back surfing on PTT. After a while, he knew what he should do. He reconnected to PTT2, and applied "tmt5l4" instead of the original ID. This time he is accepted. But after that, Mr. Tomato recalled that a guy who called "iForest" told to another guy called "ke1vin", "You should apply another 9 IDs, that is, ke0vin, ke2vin, ..., ke9vin. That will make your life be a complete circle."
So Mr. Tomato decided to applied another IDs to make his life soaked in a complete metric space (i.e. in this space, every Cauchy sequence converges to a existing point).
Could you help Mr. Tomato to count how many other IDs he should apply to encircle his life?
p.s. Sorry for my poor English...
There are multiple test cases in the input file, one per line.
For each testcase there is a new account ID which is being applied. The length of each ID will not exceed 20.
For each test case please output a number indicates how many accounts other than the original one should be created?
tmt514 tmt5l4 Time5tring a127al27 DO0oKO0Oo0X ke1vin pp5438 fernglO2l wenjoseph scan33scan33 u6iquitin ianchou82l Johnny3lSZS
999 99 9 99999 999 9 9999 9 0 9999 9 99 9
There is no tricky input :D
Migrated from old NTUJ.
DarkTmt2
No. | Testdata Range | Score |
---|