This question has several answers that involve hard-coding the output.
The rule says
Hard-coding the output
Unless the question is an obvious exception (the primary exception being those tagged kolmogorov-complexity), your program is expected to do work, not just print a pre-calculated result. If the question doesn't require input and so a solution which just prints the answer would seem to meet the spec, downvote the question rather than post a protest answer consisting of the literal output.
2 Answers 2
As the loophole states:
Unless the question is an obvious exception (the primary exception being those tagged kolmogorov-complexity
This question was not tagged Kolmogorov complexity but is obviously a Kolmogorov complexity problem. I have added the tag.
My interpretation of the spirit of the loophole
A few years ago there was a bad trend where people would post questions about complex algorithms but with a fixed output. In this case it was possible to skip the algorithm and just print the challenge.
[if] a solution which just prints the answer would seem to meet the spec, downvote the question rather than post a protest answer consisting of the literal output.
This makes it clear I think this is loophole is meant only to apply to bad questions.
An example of a "bad" question this would apply to is this one
If you understand the code (I don’t) and concluded it is hard‐coded, feel free to downvote it. There is no need to "ask" others for permission.
According to my understanding the no‐hard‐coding‐rule implies that the structure of the answer cannot be applied to a different (non‐duplicate) challenge, that it is unique to the problem. You have to tailor your submission to the specific problem.
That means something like function('data0')
and function('data1')
essentially use the same algorithm and merely differ in value, so it is hard‐coded in the sense that the programmer, nor the program, did actually engage with the task requirements.