15
2
We have a challenge to output your own score, but it seems like all the answers there just hardcode the output and that's boring1. So lets have a new challenge. Your program must output its own length in bytes followed by the string " bytes"
, but in order to prevent hardcoded solutions if we reduce its size by removing any one byte, the new program must also output it's new byte count, still followed by " bytes"
. Output does not need to be case sensitive. You may also choose to output a trailing newline.
Your answers will be scored in bytes with fewer bytes being better.
1: I actually like some of the answers there.
Maybe you could change the name of the challenge to "self scoring modifiable program" or something similar. – dylnan – 2018-09-28T19:33:53.430
Can you use complied languages or only interpreted? – Logern – 2018-09-28T21:55:03.037
@Logern You can use either. – Post Rock Garf Hunter – 2018-09-29T05:29:19.497
2
Argh. I spent half an hour making a Hexagony solution, but when I went to test it, removing the byte made the hexagon shrink!
– Jo King – 2018-09-29T07:08:10.523:(
It looks like that there won't be any problem with
1 bytes
. – user202729 – 2018-09-29T08:15:42.557@user202729 I'm not sure I understand what you mean. Could you elaborate. – Post Rock Garf Hunter – 2018-09-29T15:38:31.033
1@WW What I mean is "
1 bytes
is technically wrong grammar, but assuming languages don't have a built-in to output the string "bytes" in <= 2 bytes, the program will be longer than 3 bytes, so it doesn't matter" -- it doesn't matter anyway. – user202729 – 2018-09-29T15:40:07.300