Write a program to compose a quine of a specified length Write a program, in a language of your choice, that will compose a quine program of a requested size. The generated program may be in the same or a different language, if desired.

Programs are scored based on the following formula:


  generating_program_length + smallest_supported_size + 512 * number_of_supported_sizes ^ (-3/4)


Halve your score if you support every size between the minimum and maximum supported sizes.

Lowest score wins.
GolfScript &rarr; GolfScript: (4 + 0 + 0) / 2 = 2

~1`*



Program length: 4
Minimum supported size: 0
Maximum supported size: unbounded
All sizes supported: yes


This program simply reads an integer n from its input, and outputs an n-digit integer consisting of n 1 digits.  For example, the input 5 yields the output 11111.  In GolfScript, any integer literal (without leading zeros) is a quine, and since GolfScript integers can be arbitrarily large, the maximum supported length is only bounded by the amount of memory available.

For the input 0, the code outputs an empty program, which is also a quine in GolfScript.

Ps. The generated quines work for several other languages too, including PHP.