Unary - puzzle discussion

There isn’t any problem with the puzzle. It has been solved by thousands of other developers.

If you fail test G, change the mode to expert mode (left tab: settings), and test a custom input (G) and output (what G should be in CN language)

Hi,
Thank you for helping me.

I tested my code with the expert mode and all my test succed but i dont pass the final validation.

HI, I have got the “Solution” but the system doesn’t accept it, I guess is because the type of my output … I have it in String does anyone knows which type should it be?

thanks in advance!

The solution can only be printed as a string. So the type doesn’t matter (If you print an integer, it will still be a string). There must be something else wrong with your solution. Do you have the correct amount of zeros and spaces?

Thank You for the help, it was my bad…instead of use “System.out” i was using “System.err”

1 Like

Hi,

What is the solution for the test 4 ?

i have an error but i don’t know where, i can’t see the full true result.

here my result :

i have got solution that completely work on my localhost
Python 3.7.0 (default, Aug 30 2018, 14:32:33)
[GCC 8.2.1 20180801 (Red Hat 8.2.1-2)] on linux
but doesn’t work on your service
https://paste.fedoraproject.org/paste/dMDlfWD~-PF-GAhShFNyzQ
i have got an error about re.split(), than delimiter must be non-empty somebody, pls, help me

Hi Matioso

I have all my tests which are ok but only the last one is not good and i don’t know why too.
There is a shift but don’t know where…
Which is you language?

Hi ,

My test case is failing for the last one. and working for rest all three. any suggestions pls.

1 Like

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

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.

Look up Positional Notation
It IS unary.

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

1 Like

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?

Please show the end of each string.

1 Like

Thank you for answering :smiley:
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

It’s ok. I fixed it. :smiley:
I had forgot the ‘\n’

I used String’s padStart method.

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 …

just add ‘0’ in front of

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