Suppose we have question with single integer as input and the input ranges from 0 to n where n is small.
Is it ok to hard code answer for the inputs in the source code?
Yes. It is completely valid. You can submit your solution as a text file by choosing Text as the submit language in the dropdown menu
but for that we would need to know the input, which isn’t possible(except if you’re in the NSA/CIA/Illuminati)
If it works, it’s correct