If a program prints out null bytes and those null bytes are not part of the specification, does this disqualify the program although these bytes are unreadable?
1 Answer
Yes
When a challenge states to output a specific sequence of bytes (such as Hello, World!
), outputting anything else than that exact sequence of bytes is failing to meet the challenge specification. If you can encode the required output in a (pre-existing) encoding such that it matches the output of the submission (comparing raw bytes), it's valid.
-
\$\begingroup\$ Unless you can say you are using other encoding. \$\endgroup\$– QwertiyJun 28, 2016 at 12:06
-
\$\begingroup\$ @Qwertiy The encoding doesn't matter very much. If you produce an output that is not exactly the same as the required output, it's not valid. Byte-level comparisons just make it easier - encode the output and the requirement in the same encoding, and compare the bytes. \$\endgroup\$– user45941Jun 28, 2016 at 23:46
-
8\$\begingroup\$ If I have to output
Hello, World!
, but the real output as a byte sequence is"\0H\0e\0l\0l\0o\0,\0 \0W\0o\0r\0l\0d\0!"
I can say that it isHello, World!
in UTF16. If it is saved to file and then opend, it is exactly valid result. But\0Hello, World!
wouldn't be valid as there is no encoding we can look it in to match the required text. \$\endgroup\$– QwertiyJun 29, 2016 at 4:20 -
\$\begingroup\$ @Qwertiy Precisely. That still is covered by this answer. Like I said, if you can encode the required output in a (pre-existing) encoding such that it matches the output of the submission (byte comparison), it's valid. \$\endgroup\$– user45941Jun 29, 2016 at 4:26