Back to Problem Solutions forum
"Source message should be at first "padded" with one or more symbols so that its total length is a multiple of 5."
For example "dashiki aspirin" checker encode like MRQXG2DJNNUSAYLTOBUXE2LOGU2TKNJV, that decodes like dashiki aspirin55555.
I had to break my code for pass this task :D
Is it problem with checker, isn't it?
The checker is right. As you just said, source message should be at first "padded" with one or more symbols so that its total length is a multiple of 5.
So we add 5 chraracters to 15-length string and get a string of length 20. 20 is multiple of 5. The checker is perfectly right.
I really have no idea why you unhappy with checker.
I'm on this site for quite a lot time, and believe me, in 1% cases there is a problem with checker, and in the remaining 99% cases there is a problem with people's heads. Always check yourself before blaming the checker.
Maybe you did think that string should not be padded at all? But problem statement is clear enough: "one or more symbols" is not "zero or more symbols". And... try to write a decoder for case if "55555" is not added. You will see that adding "55555" makes decoding process much easier.
Oh, I thought that i don't had to add if its equal 5 without adding, okay, thank you) But about my decoder there isn't difference for is there some number at the end or not)
Yeah, sorry, you are right. I read problem statement again, and it states that input contain only normal text, so no tricky cases like test6
encoded.