# Chuck Norris puzzle discussion

#226

I don’t get why I don’t pass the last test. My result is:

### Failure

Found:

0 0 00 0000 0 0000 00 0 0 0 00 000 0 000 00 0 0 0 00 0 0 000 00 000 0 0000 00 0 0 0 00 0 0 000

Expected:

0 0 00 0000 0 0000 00 0 0 0 00 000 0 000 00 0 0 0 00 0 0 000 00 000 0 0000 00 0 0 0 00 0 0 00

But at this point of the input Message there are three 1 and not two?:
100001111010001110101110001111010111

#227

I think this is f*****g B.S.! Getting rid of ‘1’ and replacing it with a space doesn’t stop it from being binary. The very fact that you are encoding with two characters that have meaning is the very definition of binary encoding. Pick any two characters you want with any encoding rules you want, and it is still binary. The person that decided to call this unary was either mistaken, lazy, or an a**-***e for not giving people enough credit. In order for this to be a unary language, you would have to be able to add and remove spaces at any location without changing the message. As someone that has worked as a professional software developer, I find the detailed description of this problem to be personally offensive. As someone with a bachelors of science in computer science, I find the detailed description of this problem to be personally offensive. As someone with half a brain, I find the detailed description of this problem to be personally offensive. As someone that believes that spreading programming knowledge is a good thing, I find the detailed description of this problem to be personally offensive. My problem may be with the use of the word “unary”, but I have a problem with it because it’s obviously incorrect for those that know its proper use, but people that don’t know its proper use are being taught something that is incorrect.

#228

Look up Positional Notation
It IS unary.

Huge difference between these two concepts. That’s why the Romans struggled so much with math.

#229

There is something weird happening with the validator for the test case 4. When I send the encoded sequence to the stdout using printf() I can see the sequence is shown in the console under Standard Output Stream, but the validator says that it found “Nothing” in the standard output?
Here is a link to a screenshot (cause “new users can not upload images.”)
screenshot

Anyone have any idea why is that?

#230

Please show the end of each string.

#231

Below is the code that generates my encoded string

code
and below here is the link to a screenshot comparing both my result and the “Expected” result by the validator. unfortunately the validator one is shortened and is not completely available.

end of strings

#232

It’s ok. I fixed it.

#233

#234

Well, I was on the path.
I did complete with zeroes on the left, but up to 8 figures.
Well, it was seven …
For people struggling with conversion to binary in C# :
foreach (int c in MESSAGE)
{
l += Convert.ToString(c, 2);
}
Well, I promise nothing about the size of my code …

#237

just add ‘0’ in front of

#238

The fourth test case did not work, and I’m unable to check/verify the fourth test case.

#239

Well, so far as I remember, we had to convert to seven figures, and I put eight. So if you want to start from what I obtained, rather suppress a 0 at the beginning.
But for sure it is better to give the correct size to begin with.
Or did I ill remember ? I do not remember having been alerted about the answer, or perhaps at a moment I was very busy, sorry.

#240

Well, so far as I remember, we had to convert to seven figures, and I put eight. So if you want to start from what I obtained, rather suppress a 0 at the beginning.
But for sure it is better to give the correct size to begin with.
Or did I ill remember ? I do not remember having been alerted about the answer, or perhaps at a moment I was very busy, sorry.

#241

I do not remember what the fourth test case was, perhaps one day I shall do that puzzle again.

#242

Hi! Did any of you solve this problem? I do have the exact same solution and I’m quite sure it’s correct. I used C++ and hand-checked the last few characters, the representation of the last ‘e’ in the validator seems to be wrong.

#243

I think there is an error in the solution. The value % is
char code 37
And the solution expects the binary to be: 0100101
It should be 8 binary digits though.
So it should be 00100101
For example if you go to this website it shows the binary equivalent to be 8 0’s and 1’s long.
http://www.unit-conversion.info/texttools/convert-text-to-binary/

#244

It’s 7-bit ASCII here.

#245

ASCII is a 7-bit encoding (128 chars). There is no standard/canonical 8-bit extended ASCII, but lots of such encodings.
The tool you mention uses UTF-8, it is equivalent to the following in Python3:

``````['{:08b}'.format(c) for c in my_input_string.encode('utf-8')]
``````

#246

Thanks,
I read in the description that it is 7 bit. It just wasn’t clear enough to notice it the first time I read it.

#247

I can’t seem to append a string. Is that on purpose?