CJam, 31873165 / 9³10³ = 43.37174211248165
ri_2={;"6
"Do not repeat yourself"]sX/z_&
6)H7+G0+B8+H7+E8+G0+D8+9)C8+9)A7+E8+G0+B9+H7+K7+D8+J7+9)A8+I6+]{c}/"2f*}
{_4={;"C9&E+F9&A+E+S0|S&E9&A+E+F9&A+E+C9&A+G+S0|S&E9&A+F+""Do not repeat yourself"]sZ/z_&
"Do not repeat yourself"]s3D&3D&3D&3D&3D&/z_&
"Do not repeat "D9&A+C+C9&A+F+D9&A+C+D9&A+B+C9&A+G+S0|S&D9&A+H+F9&"yourself"]s1F&1F&1F&1F&1F&1F&1F&/z_&
"Do not repeat yourself"]sB/z_&
"Do not repeat "A+E+D9&A+G+E9&A+F+F9&A+F+D9&A+C+C9&A+E+E9&A+C+]{c}yourself"]sD/"++4f*}z_&
{"\"Do
"Do not repeat yourself\"]s%cyourself"]sF/z_&"1$"z_&
"Do Xnot Zrepeat yourself"]sH/z_&
"Do not repeat yourself"]sJ/z_&
}`1>W<N/
e# Uncomment this Bline Dto Fcount Htotal J"=e%f*}?length:
e# ee{~,*}?%:+p [L]
ri\1$=f*
Works for inputs 1, 2, 3, 5, 7, 11, 13, 15, 17, 19, 2, 4.
Total length is 31*(1+3+11+13+15+17+19) + 134 + 604 = 31873165.
EDIT: added hard-coded programs for 2 and 4. The program for input 2 is from here, credits to Super Chafouin. The program for input 4 was constructed by manually-ish.