Do not repeat yourself
CJam, 3165 / 10³ = 3.165

{
"Do not repeat yourself"]sX/z_&amp;
6)H7+G0+B8+H7+E8+G0+D8+9)C8+9)A7+E8+G0+B9+H7+K7+D8+J7+9)A8+I6+]{c}/
"Do not repeat yourself"]sZ/z_&amp;

"Do not repeat yourself"]s3D&amp;3D&amp;3D&amp;3D&amp;3D&amp;/z_&amp;

"Do not repeat yourself"]s1F&amp;1F&amp;1F&amp;1F&amp;1F&amp;1F&amp;1F&amp;/z_&amp;



"Do not repeat yourself"]sB/z_&amp;

"Do not repeat yourself"]sD/z_&amp;

"Do not repeat yourself"]sF/z_&amp;

"Do not repeat yourself"]sH/z_&amp;

"Do not repeat yourself"]sJ/z_&amp;
}`1&gt;W&lt;N/
e# Uncomment this line to count total length:
e# ee{~,*}%:+p [L]
ri\1$=f*


Works for inputs 1, 2, 3, 5, 7, 11, 13, 15, 17, 19.

Total length is 3165.

The program for input 2 is from here, credits to Super Chafouin.

Example: output for 11

"""""""""""DDDDDDDDDDDooooooooooo           nnnnnnnnnnnooooooooooottttttttttt           rrrrrrrrrrreeeeeeeeeeepppppppppppeeeeeeeeeeeaaaaaaaaaaattttttttttt           yyyyyyyyyyyooooooooooouuuuuuuuuuurrrrrrrrrrrssssssssssseeeeeeeeeeelllllllllllfffffffffff"""""""""""]]]]]]]]]]]sssssssssssBBBBBBBBBBB///////////zzzzzzzzzzz___________&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;


Explanation:

"""""""""""..."""""""""""    Push five empty strings, a long string,
                                and five more empty strings.
]]]]]]]]]]]sssssssssss       Collect them all in a list. Put that list in
                             10 more layers of list, for good measure.
                             Convert this to a string, to just get the long one.
BBBBBBBBBBB///////////       Split into chunks of size
                                11/(11/(.../(11/(11/11))))) = 11.
                             This gets us:
                                ["DDDDDDDDDDD" "ooooooooooo" ...]
zzzzzzzzzzz                  Transpose eleven times, i.e. once. We now have:
                                ["Do not..." "Do not..." ... "Do not..."]
___________&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;       Push eleven more copies, and get the unique elements.
                             This gets us:
                                ["Do not..."]