In the code-golf challenges, does it count in bytes or character length. Because one character can 1 byte ranging from charcode 0 to 255, 2 bytes ranging from 0 to 65535, etc.
1 Answer
If you click on the code-golf tag, then click "learn more" from that page, you will see the tag wiki which gives useful information about code golf. At the bottom of the page under the heading "Things to note" there is this:
- Unless the question is specified to be scored by characters, it is scored by bytes. If it doesn't specify a character encoding to use for scoring, answers which use Unicode code points outside 0 to 255 should state the encoding used.
The same works for finding out more about any other tag too.
As Draco18s points out in a comment, it's also worth noting that TIO scores languages with custom code pages according to that language's custom code page (even if the symbols themselves are from deep within Unicode). So any answer using a TIO link can be correctly scored.
-
2\$\begingroup\$ Its also worth noting that TIO scores languages with custom code pages according to that language's custom code page (even if the symbols themselves are from deep within Unicode). So any answer using a TIO link can be correctly scored. \$\endgroup\$ Jun 24, 2019 at 16:35
-
7\$\begingroup\$ For languages with SBCS, TIO just assumes that each character is a single byte rather than try and figure out if they're in the code page, so it's not necessarily correct in all cases \$\endgroup\$– Jo King ModJun 26, 2019 at 3:57