Choose a language and write a program in the language that:
- Take a valid program of the language as input,
- Output a string(bytearray, etc.). It needn't be a valid program.
- Only finite valid inputs result in longer/same-length(in bytes) output.
- Different valid input, even if behave same, lead to different output.
Let length of your code as \$L\$ and number of inputs with longer/equal-length output as \$n\$. To win, you should be lowest on at least one of:
- \$L\$,
- \$N\$,
- \$L+N\$,
- \$L+\log_2(N+1)\$.
Notes
- Solution exist so long as illegal substring exist.