[Task206]Encoder isnt including a certain string of text in output

Back to General discussions forum

mattshu67     2017-08-09 02:48:07

I noticed my answers are similar to the expected answers EXCEPT sometimes I am missing the following string at the end of the encode: "GU2TKNJV". I imagine this to be common between all encoder scripts. Look familiar? What am I missing?

Quandray     2017-08-09 07:10:30
User avatar

I used some test data containing 28 test cases and noticed that 3 of the test cases in the input ended with GU2TKNJV!

Using my C++ code, that worked 2 years ago, the output contained 3 test cases ending with GU2TKNJV.

Using your C# code, the output was missing the GU2TKNJV from the end of the 3 test cases.

I've never used C# and I may be wrong, but check that you are adding the "padding" correctly.

mattshu67     2017-08-12 04:49:08

Thank you! Helped point me to the right path. But frustrated because I misunderstood that text with a length % 5 still required '55555' to be padded at the end. That's where the GU2TKNJV was hiding :) Cheers (I didn't realize the instruction was to avoid string functions but I was already head first. Whoops)

Please login and solve 5 problems to be able to post at forum