Given a nonnegative integer n
, your solution must output a program in your chosen language whose output has n
times as many bytes as the outputted program.
Rules
- You must specify the language and encoding of the programs your solution outputs, and you may not choose different languages or encodings for different inputs to your solution. The language of your output program may or may not be the same as the language of your solution.
- Your submission only needs to handle integers in your language's range, but please do not abuse this rule.
This is code-golf so the shortest submission in bytes wins.
Example
Suppose n
is 4. My solution then outputs f_8
, a program which, in my (imaginary) language outputs j3 1s+/2]!mz
. The program output has length 3 and its output has length 3 * 4 = 12, so the solution is correct for input 4.
Suppose instead that n
is 1 and my program outputs ffffpfpffp
(10 bytes). The program ffffpfpffp
in my chosen language would have to produce an output of 10 * 1 = 10 bytes.
n
as a string? \$\endgroup\$