g | x | w | all
Bytes Lang Time Link
nanAWK241105T145725Zxrs
nanPython 3230712T223601ZEthan C
1792Mornington Crescent250408T002053ZAndrew B
019Nim250325T024950ZjanAkali
008Bespoke250325T015722ZJosiah W
nanVim210427T001349Za stone
006Jalapeño250324T021926ZATaco
022SAKO250322T062642ZAcrimori
nanAArch64 machine code + Linux syscalls230628T215519Zlandfill
015///240906T050443Zautumn
021brainfuck240802T235912ZAndrew B
027JavaScript Node.js240802T233913ZAndrew B
014Setanta240802T000507Zbb94
nanJCram240801T183502ZKamila S
009Uiua 9 bytes240801T153300ZjanMakos
022><>240801T145254ZEurope20
nanYASEPL240312T170729Zmadeforl
039Pascal240312T010001ZKai Burg
nanDesmoslang Assembly230530T045915ZDadsdy
nanRacket230714T232515ZEd The &
027Swift230714T220557ZmacOSist
001Kib230714T200102ZKomali
006ForWhile230712T195321Zbsoelch
nanC230602T151652Zlandfill
002!@#$%^&*_+230614T220457ZWallace
004Python REPL230601T185327ZThe Empt
013Python 3 PyPy230601T172440ZWallace
nanPHP151006T125354ZMartijn
nanThunno 2230528T141232ZThe Thon
nanThunno d230315T132735ZThe Thon
015Slashalash180620T154928ZSophie S
021Jelly160330T031951ZDennis
02305AB1E170606T165622ZMagic Oc
008Turtlèd160921T041803ZDestruct
004Carrot170521T124347Zuser4180
002APL220711T125145ZVadim Tu
nanFlobnar220711T080629ZBubbler
001Risky220129T062757ZDyad Han
nanPython 3220128T222609Zjeptguy
009Crystal220128T215400Zuser9275
013JavaScript220128T181140Zuser9275
012Python 3220128T183344ZLarry Ba
018Vyxal211118T035227Zemanresu
nanBraingolf170517T161141ZMayube
008Matlab151002T233550ZLuis Men
003Hexagony210427T005936Zje je
118Subleq210509T123602ZAxuary
nanExcel210428T144717ZAxuary
007Factor210427T010517Zchunes
006Julia210426T214538ZMarcMush
nanMATLAB210322T151727Zrobbie c
nanPxem210322T113610Zuser1004
002BRASCA210322T110945ZSjoerdPe
032Python210322T103719ZSegFault
028Flurry200812T015101ZBubbler
003TlanG200701T144236ZDaniel H
004JavaScript151004T123802ZUnihedro
002naz200111T055534Zsporebal
nanGolfScript200110T101258Zuser8505
022W191222T133729Zuser8505
nanGolfScript191209T180424ZPseudo N
005APL Dyalog Classic191209T130745Zuser8505
007Triangular190506T144755Zsquid
nanStax190822T221939Zuser8965
062Keg190606T151004Zuser8505
nanMathGolf190814T133021Zmaxb
002MathGolf190729T182147ZMatthew
010Underload190731T190456ZEdgex42
00833190730T232231ZTheOnlyM
nanC gcc180114T102822Zgastropn
012Python 2190729T181849ZMatthew
nanBefunge93190607T191757Znegative
087Aheui esotope190607T102726ZLegenDUS
014Python 3190606T161417ZSJ_SJ
005Deadfish~190529T185723Zsquid
122TinCan190503T161456ZDehodson
nanExcel Formula190502T103938Zi_saw_dr
004Clam190501T153828ZMayube
nan190430T181615Zmovatica
010Bash190430T175034ZBeefster
nanHusk190328T093752ZUnrelate
0358088 machine code190409T185612Z640KB
005Guile190409T153611ZSYZYGY-D
005Brainfuck190406T180931Zorthople
021Boolfuck190405T141451Zorthople
001ink190402T075346ZSara J
032INTERCAL190401T011809ZUnrelate
039Come Here190401T014021ZSuperJed
086Java190323T224536ZBenjamin
040Tamsin190323T205740ZEsolangi
nanPerl 6190321T023300ZJo King
008Perl 6190321T021055Zbb94
025Python 3170522T131240ZDjaouad
016C# Visual C# Interactive Compiler190305T205443ZGymhgy
058MIPS190306T045242ZBsoned
nanSNOBOL4 CSNOBOL4190305T211529ZGiuseppe
nanRunic Enchantments190305T210754ZDraco18s
nanBrachylog190305T202713ZUnrelate
003PowerShell181208T215519ZGMills
nanZ80Golf181209T093308ZMaya
nanJava181209T084002ZAmir M
nanAhead181209T015630Zsnail_
004Ahead181209T013830Zsnail_
nan181209T011444ZAndiChin
nanGol><>180823T025628ZJo King
191Shakespeare Programming Language180527T033344ZJo King
020Hummus180604T190405ZAzeros
001Charcoal170521T184745Zuser6318
nanPerl 5180601T160326Zfockjef
nanWolfram Language Mathematica180531T095614ZShieru A
036C180531T035558ZJ. Merdi
024Rebol180530T211647ZFriendly
026Minecraft Functions 18w15a180527T232945ZNoskcaj
018Ruby180527T080823ZWindmill
nanJavaScript REPL180522T015723Zl4m2
036Whitespace180521T223812ZCensored
030BrainFlak180114T043221ZJo King
011Attache180522T000605ZConor O&
nanBefunge98180114T031854ZJo King
046F#180521T212043ZCiaran_M
nanJapt P180521T065909ZBubbler
nanJavaScript Node.js180420T032027ZYair Ran
006Fission171013T135746ZKSmarts
001Implicit170912T034740ZMD XF
090Java160330T013712Zhyperneu
nan05AB1E160922T122922ZEmigna
021LibreLogo171014T031952ZGrant Mi
nanSmileBASIC170126T125206Z12Me21
nanBASH + coreutils170927T140000ZAndrew D
035Scala170929T214142Zcubic le
001Japt170522T081418ZShaggy
nanRProgN 2170925T035914ZATaco
nanPyth151002T232139Zlirtosia
nanJavaScript ES6151002T232801ZDankMeme
030Windows Batch170521T123314Zstevefes
001Jq 1.5170919T045543Zjq170727
001Mathematica REPL151003T032051Zalephalp
004dc170917T031952Zcab404
nanVBA170606T135313ZTaylor R
nanPyke170916T195542ZBlue
nanPyke170916T195350ZBlue
001Pyke170916T194608ZBlue
020TIBASIC170912T214418ZKhuldrae
nanLy170821T222440ZLyricLy
015Java 8170814T152741ZNotBaal
002TIBasic170606T154335ZTimtech
028Python 2170628T153901ZFedone
nanQBIC170126T102020Zsteenber
005Bash170605T144533ZWossname
nan><>170604T171929ZEsolangi
nanCheck170604T171231ZEsolangi
011bash170603T155237ZWossname
001Braingolf170603T115044Ztotallyh
nanForth gforth170524T114955Z2xsaiko
nanFourier170522T091619ZBeta Dec
002Pari/GP170521T152132Zalephalp
nanREXX 33 Bytes 25 = 8170521T130748Ztheblitz
004Powershell 4 Bytes170518T121202ZSivapras
nan05AB1E170518T085139Zkalsower
045PHP170413T140559ZJimwel A
nanFourier Noncompeting170413T130434ZBeta Dec
002k170413T011848Zzgrep
010Excel170413T002214ZJör
002J170412T234212ZBijan
nanAlice170412T185420ZMartin E
nanHaskell170226T130819ZSacchan
013ForceLang170226T123731ZSuperJed
029Processing151007T181713Zuser4180
107Java 132 25 =170226T110158Zuser6333
016[NonCompeting] C170226T083333ZAlbert R
025C151003T021235ZAlbert R
002Pushy170127T191701ZFlipTack
006PKod170127T191410ZOfftkp
024Ruby160704T041037Zanna328p
035Kitanai170127T105248ZSygmei
009PHP no bonus161218T143355ZTitus
nanPHP161218T144015ZTitus
008Juggle170127T041647ZZavada
002TIBasic170126T162143ZJulian L
020Python 3170126T160219ZJimmy Jo
017Recall151003T055138Zuser4264
030slang161023T145743ZErik the
082Java 8160922T132854Zmrco
nanScala160922T120340Zcorvus_1
027Nim160922T112924ZCopper
010Cubix160921T014233ZETHprodu
019BASH160804T153253ZCousinCo
nanPython160804T032531Zvikarjra
128BrainFlak160804T042729ZWheat Wi
002V160804T034650ZDJMcMayh
011Perl5160703T233802ZByeonggo
003Desmos160703T225242Zweatherm
204PD160622T101306ZSimon
007dc160621T222248Zjuh
003APL160528T232740ZTuxCraft
085Java160528T195159ZHopefull
010Tellurium160528T140452Zm654
002JavaScript160505T233028Zericw314
017Batch160402T125357ZMrPaulch
nanPHP160330T144718Zricdesi
009Brian & Chuck160331T101438ZSp3000
006Hexagony160331T101038ZMartin E
nanLabyrinth160331T095409ZMartin E
nanLua151004T171227ZTrebuche
012Underload160330T222823ZMickyT
002Pylongolf160330T211657Zuser4701
211J160330T020956ZLeaky Nu
2011Lua160330T025420ZLeaky Nu
015Cubix160330T011540ZMickyT
008Fuzzy Octo Guacamole160329T215803ZRiker
011Python 2160319T163921ZZach Gat
016Z80 machine code160319T093107ZFox
003Gogh160319T041605ZZach Gat
009Mathematica151229T140748ZLegionMa
nanPerl 5151002T233825ZCodefun6
nanMumps151228T214544Zzmerch
001PlatyPar151216T012627ZCyoce
nanBinaryEncoded Golfical151217T174002ZSuperJed
005MATLAB151217T170529ZTom Carp
011Python 2151217T154745ZASCIIThe
003SWIProlog151027T100341ZFatalize
011Perl151216T185650ZASCIIThe
nanNote This answer did not work when the question was asked151216T015655Zizzyg
030Sass151215T130515ZFabrizio
nanMouse2002151214T141406Zcat
003Perl 6151028T013416ZBrad Gil
015Python151027T142343ZTheDocto
nanJavaScript ES5151005T012254ZDomino
017CJam151003T000509ZDennis
009Common Lisp REPL151027T064721ZCandles
nanMinkolang 0.9151027T040242ZEl'e
nanVitsy151026T124944ZAddison
007Burlesque 7 Bytes151020T144956Zmroman
nanSimplex v.0.5151020T040448ZConor O&
055Hassium151012T175457ZJacob Mi
nan151012T115128ZNebula
059Go151003T190421ZFabian S
008APL151009T134522Zmarinus
004Pyth151003T175341ZErik the
001CJam151008T165445ZMama Fun
003Javascript151006T233721ZMama Fun
nan151005T180930ZMutador
002JavaScript151008T121702ZUnihedro
nanRetina151006T150046ZMartin E
004POSIX bc151007T223601Zawd123
077C#151007T203618ZThomas W
078Funciton151007T195858ZTimwi
nanPython 2.7151007T184621ZStatus
nan151007T163204ZPenutRea
nanPython 3151006T230550ZBlckkngh
011Python 2151006T112233Zdieter
001Bubblegum151004T003045ZDennis
001Bash + GNU coreutils151003T081331Zuser1921
001Bash + GNU coreutils151006T111300ZToby Spe
4015Sed151005T170407ZToby Spe
007DOS151006T101157ZBerend
010Seed151005T165248ZSp3000
nan><>151002T235620Ztorcado
nanSelfmodifying Brainfuck151005T193335Zmbomb007
768Shakespeare151004T054530ZLuke
082C151005T180011Zwefwefa3
004MUMPS151005T175546Zsenshin
010Powershell151005T154406Ztomkandy
014Brainfuck151005T091514Zanatolyg
001Insomnia151005T072714Zn̴̖̋h̷͉̃
009Julia151003T112723ZMoritz S
002QBasic151005T022036ZDLosc
003R151005T004112Zflodel
023C151004T221339Zanatolyg
025Brainfuck151004T220042ZHand-E-F
001TIBASIC151004T174937ZConor O&
nanGolfScript151004T173828ZIlmari K
nanJavaScript ES6151004T060716ZPatrick
005Ruby151004T155756ZRocko
019Haskell151004T120845Znimi
nan><>151004T142124ZSp3000
001GolfScript151004T124505ZProgramF
012MSM151004T122914Znimi
025C151004T121949ZVincent
nanRuby151004T032827ZNathan M
062C#151003T214630ZLucas Tr
nanPyth151003T212829Zizzyg
nanElement151003T045457ZPhiNotPi
009PHP 7151003T191415ZFabian S
003TIBasic151003T050424ZDeusovi
006Pyth151003T173032Zclapp
nandc151003T004905ZDigital
013Stuck151003T161115ZKade
009CJam151002T232835ZThe_Bass
013Python 3.4151003T025851Zuser4551
nanJavaScript ES6151003T004838ZSuperJed
018gs2151003T110816Zlynn
nanJavaScript ES6151003T000206ZGeorge R
009Perl151003T083257Zsteve
nanPerl151003T083211Zprimo
nanBefunge98151002T234755ZEl'e
nanawk151003T074145ZCabbie40
nanC#151003T070805Zdev-masi
003q151003T053851ZAlexande
027q bonus151003T063857ZAlexande
002HQ9+151003T062256Zrandomra
080C++151003T060318ZLiam
023Macaroni 0.0.2151003T023435ZDoorknob
001Microscript151003T002901ZSuperJed
010Python 2.6151002T233522Zxnor
011Python 2151002T232313Zxnor
nandc151003T002322Zdaniero
nanRuby151003T004902Zhistocra
nan><>151002T234327Zcole
021Mouse151002T234559ZAlex A.
nanJulia151002T232617ZAlex A.
006Ruby151002T234111Zdaniero

AWK, 34 bytes - 25 bonus = 9

{for($1||$1=2;x++<$1*34;)printf 1}

Try it online!

Prints ones multiplied by the input.

{for(;x++   # more ones
 <$1        # while less than input -
*26;)       # times length of program
printf 1}   # print you a one

Python 3, 28 27 bytes - 25 bonus = 2 bytes

-1 byte by l4m2

lambda n=2:print(*[99]*9*n)

Try it online!

Takes in an int as input and outputs [99] (99 is an arbitrary two-char number) times 9, which is the length of the code (27) divided by 3. The star expansion operator * makes print print the contents of [99]*9*n as a space-separated string. There are 9*2n characters from the 99's, and 9*n-1 characters from the spaces, for a total of 18n+9n-1=27n-1 characters. With the newline (+1 byte) that becomes 27n characters printed.

Mornington Crescent, 1792 bytes

Take Northern Line to Chalk Farm
Take Northern Line to Chalk Farm
Take Northern Line to Edgware
Take Northern Line to Chalk Farm
Take Northern Line to Chalk Farm
Take Northern Line to Edgware
Take Northern Line to Chalk Farm
Take Northern Line to Chalk Farm
Take Northern Line to Edgware
Take Northern Line to Bank
Take Northern Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Hammersmith
Take District Line to Paddington
Take District Line to Bank
Take District Line to Bank
Take Northern Line to Mornington Crescent

Try it online!

Nim, 19 bytes

echo newseq[00](12)

Try it online!

Produces output with a newline:

@[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

Bespoke, 8 bytes

no stack

Prints Stack underflow. to STDERR.

Alternate version, 44 bytes

for my entry:N to some exponent,and output N

Prints 51^51, which is 88 digits long.

Vim, 26 25 - 25 = 0 bytes

-1 thanks to Aaron Miller

:s/^$/2
C<c-r>=<c-r>"*25
<esc>|D@"ix<esc>

Try it online!

Explained:

:s/^$/2<cr>           Substitute blank line with 2. This is the case when no input is given.
C                     Cut the input line and enter insert mode
 <c-r>=               Enter expression mode
       <c-r>"         Paste input
             *25      Multiply by code length
                <cr>  Evaluate
<esc>                 Return to normal mode (from insert mode)
     |                Move to the beginning
      D               Delete the line (which is the number of characters to output)
       @"             Paste the deleted line as the count argument to `i'
         ix           Insert `x'
           <esc>      Exit insert mode and repeat that many times

Jalapeño, 6 bytes, -19 score

|2*6* 

With a trailing space.

Hex-Dump of Bytecode

       0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0000: 57 32 52 36 52 25                               

Kind of boring answer, |2 gives either the Input, or 2 otherwise, *6 multiplies by 6, the source code length, and * then repeats space characters that many times.

As of Version 12 of Jalapeño, space is the only one byte string that takes one byte to represent, so it's optimal.

Try it Online!

SAKO, 22 bytes

1)LINII44
STOP1
KONIEC

This is just a port of my answer here.

Almost qualifies for a bonus, but doesn't default to 2, 38 bytes

1)CZYTAJ:N
LINIIENT(38×N)
STOP1
KONIEC

Unforunately do get an empty input we would need to read a string instead of a number and parse it, which is just not really worth it even with the bonus.

I did it anyway, 143 - 25 = 118 bytes

CALKOWITE:*N,W,I
BLOK(9):N
CZYTAJWIERSZ:N
W=0
*)GDYN(I)=58:2,INACZEJ1
1)W=W×10+N(I)-48
POWTORZ:I=0(1)9
2)LINII145×(W*SGN(1,I)+0*I)
STOP2
KONIEC

Maybe there is a way to shorten the loop, or the operation at label 2.

AArch64 machine code + Linux syscalls, 56 - 25 = 31 bytes

00: 4f03e7c0  movi  v0.16b, #126      // v0 / q0 = '~' * 16
04: ad0003e0  stp   q0, q0, [sp]      // stack   = '~' * 32
08: ad0103e0  stp   q0, q0, [sp, #32] // stack   = '~' * 64
0c: 52800048  mov   w8, #2            // default to 2
10: 71000409  subs  w9, w0, #1        // argc - 1
14: 1a890109  csel  w9, w8, w9, eq    // argc - 1 ?: 2
18: 910003e1  mov   x1, sp            // pointer to '~' * 64
1c: d2800702  mov   x2, #56           // 56 bytes
20: d2800808  mov   x8, #64           // 64 = write()
24: d2800020  mov   x0, #1            // 1 = stdout (loop starts here)
28: d4000001  svc   #0                // syscall, write(stdout, '~' * 64, 56)
2c: 51000529  sub   w9, w9, #1        // loop countdown
30: 35ffffa9  cbnz  w9, 0x24          // loop
34: d65f03c0  ret                     // return result of last syscall

Should be linked as main.

The input is the number of command line arguments.


If it needs to be linked as _start and isn't allowed to segfault out:

AArch64 machine code + Linux syscalls, 60 - 25 = 35 bytes

00: 4f03e7c0  movi  v0.16b, #126      // v0 / q0 = '~' * 16
04: ad0003e0  stp   q0, q0, [sp]      // stack   = '~' * 32
08: ad0103e0  stp   q0, q0, [sp, #32] // stack   = '~' * 64
0c: 52800048  mov   w8, #2            // default to 2
10: 71000409  subs  w9, w0, #1        // argc - 1
14: 1a890109  csel  w9, w8, w9, eq    // argc - 1 ?: 2
18: 910003e1  mov   x1, sp            // pointer to '~' * 64
1c: d2800782  mov   x2, #60           // 60 bytes
20: d2800808  mov   x8, #64           // 64 = write()
24: d2800020  mov   x0, #1            // 1 = stdout (loop starts here)
28: d4000001  svc   #0                // syscall, write(stdout, '~' * 64, 60)
2c: 51000529  sub   w9, w9, #1        // loop countdown
30: 35ffffa9  cbnz  w9, 0x24          // loop
34: d2800ba8  mov   x8, #93           // 93 = exit()
38: d4000001  svc   #0                // syscall, exit(result of last syscall)

If the input number being the number of command-line arguments doesn't count, here's one with no bonus:

AArch64 machine code + Linux syscalls, 40 bytes

00: 4f03e7c0  movi  v0.16b, #126      // v0 / q0  = '~' * 16
04: ad0003e0  stp   q0, q0, [sp]      // stack    = '~' * 32
08: ad0103e0  stp   q0, q0, [sp, #32] // stack    = '~' * 64
0c: 3d8013e0  str   q0, [sp, #64]     // stack    = '~' * 80
10: 910003e1  mov   x1, sp            // pointer to '~' * 80
14: d2800a02  mov   x2, #80           // 80 bytes
18: d2800808  mov   x8, #64           // 64 = write()
1c: d2800020  mov   x0, #1            // 1 = stdout
20: d4000001  svc   #0                // syscall, write(stdout, '~' * 80, 80)
24: d65f03c0  ret                     // return result of last syscall

And for both of the above conditions:

AArch64 machine code + Linux syscalls, 44 bytes

00: 4f03e7c0  movi  v0.16b, #126      // v0 / q0  = '~' * 16
04: ad0003e0  stp   q0, q0, [sp]      // stack    = '~' * 32
08: ad0103e0  stp   q0, q0, [sp, #32] // stack    = '~' * 64
0c: ad0203e0  stp   q0, q0, [sp, #64] // stack    = '~' * 96
10: 910003e1  mov   x1, sp            // pointer to '~' * 96
14: d2800b02  mov   x2, #88           // 88 bytes
18: d2800808  mov   x8, #64           // 64 = write()
1c: d2800020  mov   x0, #1            // 1 = stdout
20: d4000001  svc   #0                // syscall, write(stdout, '~' * 96, 88)
34: d2800ba8  mov   x8, #93           // 93 = exit()
38: d4000001  svc   #0                // syscall, exit(result of last syscall)

///, 15 bytes

/a/bbbbb/aaaaaa

Try it online!

brainfuck, 21 bytes

-->++++++[<.......>-]

Try it online!

Note: I decided to code this such that it prints printable ascii characters.

JavaScript (Node.js), 27 bytes

console.log('*'.repeat(53))

Try it online!

Setanta, 14 bytes

scriobh([1]*9)

try-setanta.ie link

JCram, 9 - 25 = -16

2RⒶ¯⍓↑⍆Ⓩ⏚

Equivalent to ES6 (n=2)=>console.log(''.padEnd(n*9)).

Uiua -9 bytes

Try it out!

&pf▽16+@0⇡⍣⋕2&sc

Will print 16 copies of each ascii character up to the input length, starting with 0. i.e. Input of 3 gives 000000000000000011111111111111112222222222222222 (defaults to 2 if no input given)

><>, 22 bytes

095*>1-:?v;
    ^o*86<

Try it online!

Pushes 0 and 45 (which is subtracted by 1 right after), then outputs a zero that many times.

YASEPL, 22 - 25 = -3 bytes

=a'}7,""$2`1*22;"a",a~

YASEPL, 10 bytes (no input)

=a;"a",20~

Pascal, 39 Bytes

This complete program in accordance to ISO standard 7185 “Standard Pascal”

program p(output);begin write(6:78)end. { No trailing end‑of‑line character. }

prints

                                                                             6

without a trailing end‑of‑line character (tested with the GNU Pascal Compiler and FreePascal Compiler).

Pascal, 90 − 25 = 65

The overhead for the bonus does not pay off since you must add input to the program parameters list and test for EOF, because reading from input is illegal if the end of file has been reached.

program p(input,output);var n:integer;begin n:=2;if not EOF then read(n);write(1:90*n)end.

Desmoslang Assembly, 11 - 25 = -14 Bytes

[1...11*IOT

Note that you can't not give input.

Racket, 72 - 25 = 47 bytes

#!racket
((λ(n)(display(make-string(*(if(eq? eof n)2 n)72)#\a)))(read))

Try it online!


Explanation

The language expression for Racket is #!racket. This just tells Racket's system what language to run the program with.

On line two, we create an immediately invoked lambda that receives one optional input from the user. User input can be either #<eof> (no input) or a number n. If there is no input, we set n to be 2.

We multiply n with the length of the program which is 72 bytes (λ counts as two bytes) and use the result to make a string of as. I could have saved 3 bytes by not specifying any character to be printed, but that would print an empty string with 72 null characters. Once the string is made, we print it to standard output.

#lang racket

((lambda (n)
   (display (make-string (* (if (eq? eof n) 2 n) 72) #\a)))
 (read))

Links to relevant documentation

Have a wonderful weekend!

Swift, 27 bytes

for i in 87...103{print(i)}

Prints the numbers 87 through 103 inclusive, each number followed by a newline, for a total of 54 bytes.

Kib, 1 byte (noncompeting)

0

Any numeral works because of implicit output.
More interesting 4 byte solution

\A7*

\A     # Push char 'A'
  7    # Push 7
   *   # Multiply

(for reference this language is largely unfinished; I made it a couple months ago as a side project)

ForWhile 6 bytes

6(9##)

prints 12 tabs

online interpreter

Explanation

6(   \ start for-loop with 6 iterations
9##  \ print tab twice
)    \ end for-loop

C, 47 - 25 = 22 46 - 25 = 21 bytes

x=2;main(){scanf("%d",&x);printf("%*x",x*46);}

Try it online!

Works by printing an uninitialised int, padded to the specified size. Credit to anatolyg's answer.

!@#$%^&*()_+, 2 bytes

^?

Try it online!

Python REPL, 4 Bytes

9**8

\$9^8=43046721\$

Python 3 (PyPy), 13 bytes

print('h'*26)

Try it online!

PHP, 56-25 = 31 bytes

I wanted one where size of the code doesn't matter:

<?=str_repeat(file_get_contents(__FILE__),$n!=''?$n:2)?>

Or a more modern version:

<?=str_repeat(file_get_contents(__FILE__),$argv[1]?:2)?>

Thunno 2, 8 - 25 = -17 bytes

2|8×⁻'x×

Attempt This Online!

Explanation

2|8×⁻'x×  # Implicit input (or not)
2|        # Logical OR with 2
          # (if there was no input, push 2)
  8×      # Multiply it by 8
    ⁻     # Decrement to account for
          # the trailing newline
     'x×  # Repeat the character "x"
          # that many times
          # Implicit output with newline

Thunno d, 7 - 25 = -18 bytes

2~zd*ZL

Attempt This Online!

Explanation

2~       # Logical OR with 2
  zd     # Read the source code
    *    # Repeat it that many times
     ZL  # Print without a trailing newline
         # Implicit output

Thunno, 1 byte

1

Attempt This Online!

Prints 1 with a trailing newline. Any digit will work here.

Slashalash, 15 bytes

/o/ttttt/oooooo

Try it online!

Jelly, -21 bytes

o2⁴x

The source code is 4 bytes long and qualifies for the -25 bytes bonus. Output is a list of 16's.

Try it online! without input or with input.

How it works

o2⁴x  Main link.
      If there's input, the left argument is set to that input.
      Otherwise, it defaults to 0.
o2    Logical OR of the left argument and 2.
      The return value is now either the input or 2.
  ⁴x  Repeat 16 that many times, creating an array.

16 is two bytes long, and n copies are separated by n - 1 instances of . That, plus the two bytes of [ and ] gives 2n + 2(n - 1) + 2 = 4n bytes of output.

05AB1E, -23 bytes

Try it online!

Turtlèd, 8 bytes

15:[*,l]

explanation:

[implicit] initial cell is *, initial char var is *
15       put 15 in register
  :      move right by as many cells as the amount in register
   [*  ] while cell not *
     ,l  write char var, move left 1 cell

Carrot, 4 bytes

.^*7

Prints ........ (8 .s).

Try it online!

Explanation

.^                        Sets the stack-string to "."
  *7                      Append seven duplicates of the stack-string to itself
                          Implicit output

APL, 2 bytes

!7

The program prints the number 5040 (factorial of 7).

APL, 8 bytes (Bonus)

'*'⍴⍨8×⎕

The program prints asterisks (8 times more than n).

Flobnar, 27 - 25 = 2 bytes

*< _.v\@
 *:|\<>
9&- <
3210

Try it online!

The decimal input command & defaults to its south (2) if it fails to read a number. Prints 27 times input copies of 0.

Flobnar, 8 bytes

0.!____@

Try it online!

Prints 16 copies of 0.

Risky, 1 bytes

*1

Try it online!

(Prints 10, by doing 10 ** 1)

Python 3, (30-25)=5

def f(n=2):print((n*30-1)*"A")

The output includes a newline at the end which is accounted by subtracting 1 from the product of n and 30, the code length.

Crystal, 9 bytes

print 5/7

Try it online!

JavaScript, 21 16 13 bytes

alert("A"*26)

Python 3, 12 bytes

print(9<<75)

Try it online!

Vyxal, -18 bytes

2∨6*¤꘍₴

Try it Online!

2∨      # n || 2
  6*    # times 6
    ¤꘍  # spaces
      ₴ # Without a trailing newline

Polyglot, 1 byte

0

In Vyxal, 05AB1E, K, (edit in more), prints 0 with a trailing newline.

Braingolf, (9 - 25) = -16 bytes

91+<9*1-^

Takes n input and outputs a 1 followed by x zeroes where x = (n * 9) - 1

Braingolf, 5 bytes

91+9^

Outputs 1000000000 (10**9)

Matlab, 8 bytes

1234;'5'

Output:

enter image description here

The output contains newline, ans =, newline twice, space four times, '5', newline, so 16 bytes.

Hexagony, 3 bytes

?"&}>'􏑇!_!!}(\\2"^$\<_!\@

Try it online! Note: For some reason, the special Unicode character my code uses (􏑇, 0x10f447) seems to break TIO's link generator. So to make a linkable version, I replaced the character with X. Unfortunately, to run the code properly you'll have to copy and paste the character into the code in place of the X. Sorry about that.

Expanded:

    ? " & }
   > ' 􏑇 ! _
  ! ! } ( \ \
 2 " ^ $ \ < _
  ! \ @ . . .
   . . . . .
    . . . .

Whoops, thought I had a -3 but looked back over the problem and realized I missed that n defaults to 2 for an empty input. So here's 28 bytes, qualifies for 25 byte bonus. Works for values of n > 0, and defaults to n = 2 for empty input.

Explanation:

The first bit of code thats run is ?"&}2"^. ? reads n from input. Then "&}2" populates the cell to the right of n with a copy of itself, and the cell to the left with 2. This sets up for ^, which copies the value to the left of the current cell if the current cell is non-positive or empty, or the value to the right if it is positive. So if n does not exist or is non positive it is replaced with 2, otherwise it keeps its current value. After that, its just a matter of running through a simple for loop which decrements n until it reaches 0, each time printing the Unicode character 0x10f447 4 times using !. ! prints the decimal representation of a character, and 0x10f447 is 7 digits long, so in total 28 bytes are printed for each decrement it takes n to reach 0. The Unicode character is arbitrary, any with 7 digits in decimal would work (there are no 8 decimal digit characters.)

Edit: 5 byte bonus answer (doesn't qualify for answer bonus):

!<gg@

4 byte bonus answer, but it doesn't terminate:

!<)0

Subleq, 12 11 bytes (Assuming an 8 bit word)

2 -1 88 10 11 -1 8 8 0 1 22

Subleq emulator

Explanation

0:  2 -1 88 ' Output 2: "X"
3:  9 10 -1 ' 10: = 10: - 9:, if 10: <=0 exit
6:  8  8  0 ' 8: = 0, goto 0
9:  1 22    ' data

64 bit word, 96 88 bytes

2 -1 88 9 10 -1 8 8 0 1 176

Excel, 23 - 25 = -2 bytes

=REPT(0,IF(A1,A1,2)*23)

Saves 2 bytes by repeating a number instead of a character.

Excel, 4 bytes

=8^8

8^8 is an 8 digit number

Factor, 7 bytes

42 2^ .

Try it online!

2^42 is a 13-digit number. . outputs this number plus a newline.

Julia, 6 bytes

@info%

outputs in stderr (12 bytes including the trailing newline)

[ Info: rem

Explanation: % is the rem function (remainder)

Try it online!

MATLAB, 40 - 25 = 15 Bytes

I like using matlab, and I am slightly disappointed that what is probably the optimal answer for it has already been written. But here's a shot at achieving the bonus, which doesn't help ultimately but was fun regardless.

f=@(n)disp(char(linspace(1,2,2*2*10*n)))

Define an anonymous function that is 40 characters long. User calls the function as f(n) and it will output 40*n characters. (I think this complies with code golf rules but feel free to call me out if it doesn't)

with no output, the error message returned is

Not enough input arguments.

Error in @(n)disp(char(linspace(1,2,2*2*10*n)))
 
K

which comes out to 80 bytes, or 2x the length of my function. It's hacky but any other way would take more I'm fairly certain.

Pxem, 30 bytes (Filename) + 0 bytes (Content) - 25 bytes (bonus) = 5 bytes, requires nonprintable character, does not deal with default.

Try it online! (with pxem.posixism)

With comments

XX.z
# read integer and push it (pxem.posixism errors when not given)
.a._XX.z
# dup; while pop!=0; do
.a.c.wXX.z
  # heap=pop
  .a.tXX.z
  # .e command actually stands for calling content as
  # subroutine BUT content is empty so it stands for
  # duplicating entire stack
  # also non-command substrings stand for literals
  # so stack would have (3*2+1)*2+1*2=30 X's
  .aXXX.eX.eX.eXX.z
  # pop all to output each of them
  .a.pXX.z
  # push heap; push 1; push abs(pop-pop); dup
  .a.m\001.-.cXX.z
# done
.a.a

Pxem, 12 bytes (Filename) + 0 bytes (Content) = 12 bytes.

It outputs 24 X's without trailing LF.

Try it online!

How it works

XX.z
# push two X's
.aXXXX.z
# call content (as subroutine), pushing final result
## NOTE if original stack was 1,2,3 from top,
## the subroutine stack is also intialized with 1,2,3
## Then when returning from subroutine with final result of stack 4,5,6
## then original stack would be 4,5,6,1,2,3
## Since content is empty, it stands for duplicatinf entire stack
.a.eXX.z
## now X,X,X,X
# push two X's
.aXXXX.z
## now four X's
# duplicate entire stack twice
.a.e.eXX.z
# finally pop all to output each of them
.a.p

BRASCA, 2 bytes

CK

Try it!

Explanation

C   - Output implicit output as number
 K  - Push 1000

Python - (32 bytes - 25) = 7

k="1"*32
n=int(input())
print(k*n)

So close :(. This code takes a string k (which is 32 chars long, same as this code), takes n as an input, and prints k repeated n times.

Python - 16 bytes (no bonus)

k="1"*32
print(k)

Same as above, but without taking input, and thus, the code is only 16 bytes long.

Flurry, 28 bytes, no bonus

({<(({})){}{}>})({}){({})}{}

Verification

$ echo -n "({<(({})){}{}>})({}){({})}{}" | wc -c
28
$ ./flurry -iin -c "({<(({})){}{}>})({}){({})}{}"
3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
3
$ ./flurry -iin -c "({<(({})){}{}>})({}){({})}{}"  | wc -c
56

Uses 3 ** 3 = 27, and enables both stack output and return value output so that 3 is printed 27 + 1 times.

(
 {<(({})){}{}>}  Literal 3
)              Push and return 3
({})           Pop, push and return 3; 3 3 -> 27
{({})}         Push&return function
{}             Pop 3; 27 push&return 3 -> push 27 copies of 3 and return 3

Flurry, 32 bytes, no bonus

<(({<({}){}>})({})){}{}>{({})}{}

Verification

$ echo -n "<(({<({}){}>})({})){}{}>{({})}{}" | wc -c
32
$ ./flurry -inn -c "<(({<({}){}>})({})){}{}>{({})}{}"
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
$ ./flurry -inn -c "<(({<({}){}>})({})){}{}>{({})}{}" | wc -c
64

How it works

In order to increase the output size, it is easiest to push numbers to stack and print them in integer mode. Basically the program follows the structure of n push&return m, where n is the repeat count, push&return is a function that, given an argument, pushes it and returns it unchanged, and m is the number to push. Then the stack contains n copies of m at the end, giving the output size of (length of m + 1) * n.

The second part of the challenge is to generate high enough numbers. Flurry uses Church numerals to represent natural numbers, so multiplication (<abc...> evaluates to a * b * c * ...) and exponentiation (ab evaluates to b**a) is much golfier than number literals (except 1), successor <><<>()>, and addition (which is defined via successor). So I tried various powers and products until I got the solution, where 32 is 4 * 4 * 2.

<
 (
  ({<({}){}>})  Push and return 2
  ({})          Pop 2, push back and return 2
 )            Push and return 2 ** 2 = 4
 {}{}         Pop 4 and Pop 2
>           Product; return 4 * 4 * 2 = 32
{({})}      Function: push&return
{}          Pop from empty stack, which gives I = 1
32 push&return 1 -> Push 1 to stack 32 times and return 1

TlanG 3 bytes

.*6

Out: ......

Explainations in the readme on the TlanG github.

JavaScript, 4 bytes

+1/0

Prints Infinity

I think this is the shortest possible JS solution without ES6 :P

naz, 2 bytes

4o

Outputs 0000.

Explanation

The default value of the register is 0; if the register's value is between 0 and 9 inclusive, use of the o instruction will output that number as an ASCII character.

GolfScript, 13-25 = -12 bytes

.~13*(25if n*

Try it online!

Explanation

        if     # If
.              # Input is not a null string:
 ~             # Evaluate the input
  13*(25
           n*

W, -22 bytes

The program is 3 bytes long and qualifies for the -25 byte bonus. (Okay. One-digit problem fixed!)

 0M

Explanation

   % Filler space
 M % Map: (implicitly) generate a list from 1 to the input
   % There is an implicit 0, so the 0-input
   % will produce the output [0, 1], which is
   % 6 bytes by default.
 M % Map every item in that list ...
0  % .. with the numeric constant 0

GolfScript, 18 - 25 = -7

.!35 n*{~18*(n*}if

Try it online!

Prints \$input * 6 - 1\$ newlines if there is an input else 35 newlines, plus one trailing newline.

                if           If
.!                           input is empty:
  35 n*                      35 newlines
       {       }             Else:
        ~18*(n*              18 * input - 1 newlines
                             Trailing newline

APL (Dyalog Classic), 5 bytes

⎕←1e9

Try it online!

Explanation

Not very interesting... but I hope this hasn't been posted before.

   1e9 ⍝ This returns the constant 1000000000
⎕←    ⍝ Move this to the output buffer

Triangular, 10 8 7 bytes

tdC%.`y

Try it online!

Prints odd numbers from 11 to 1 descending, twice each.

Triangular executes as if written in the shape of a triangle. For example, if your program was 123456, the triangle representing your program would be drawn like this:

  1
 2 3
4 5 6

The program executes starting from 1, and has a Southeast direction (I.e., the above would run as 1, 3, 6). This explanation is for its actual execution order, which is why it doesn't visually look the same as the submission.

Ungolfed/Directional

   t
  d C
 % . `
y

-------------------------------------------------------------------

t             - If ToS != 0, set direction to SouthEast
 C            - Push 12
  `           - Set direction to NorthWest (This means we hit "t" with ToS > 0)
   d          - Decrement the top value of the stack
    %y        - Print the top value of the stack, then change direction to NorthEast if ToS != 0

Previous Version (8 bytes):

Dn,%d./<

Stax, 16 bytes - 25 = -9

|?xx{{dqF}{dqq}?

Run and debug it

Uses Stax's sneaky |? command, which means that the output is also 2 quines (or any other input number)

However, one downside is the fact that I can't use packed stax, as the |? operation prints out unpacked source code, even if the source is packed

Keg, 6 2 bytes

(|A,)

It loops 12 times printing 12 A's to the console, which is double the size of the program. There is a control character (0x0C) between the ( and |, which makes this 6 bytes.

Another shorter version:

A

This prints A plus a newline, which contains 2 characters.

Worth a mention(3 bytes):

5/

TIO

MathGolf, 5 - 25 = -20 bytes

╜2╩[*

Try it online!

Explanation

╜2      If not implicit input, push 2
  ╩[    Push dictionary word "great"
    *   Repeat string

To make it work, I just had to find a word within the top 256 lines of the dictionary which had the same length as the code.

Almost working 3-byter with 25 byte bonus

╜2r

Try it online!

Basically the same as Stan Strum's Pyth answer. If (implicit) input is equal to 0, push 2. Then create a range using either the 2, or the implicit input. The length of the output is the length of the string representation of the array, which is 3 times the length of the array. This only works for input \$\leq 10\$.

MathGolf, 2 bytes

7!

Outputs 5040, which is 4 bytes.

Try it online!

Underload, 10 bytes

()aaaaa:*S

I'm pretty sure this is unimprovable, since I made a python script to test all possible combinations of instructions. However, I did only include the instructions a:*S in it, and made it so it always starts with (), so there could be a crazy solution involving ^ or ~. Also, for those curious, there are actually 5 other valid 10 byte solutions:

()aaaaa:SS
()aa:a*:*S
()aa:a*:SS
()aa:*a:*S
()aa:*a:SS

Try it Online

33, 8 bytes

13c1[mo]

Prints 1211109876543210, which is 16 bytes long

C (gcc), 35 - 25 = 10 34 - 25 = 9 bytes

-1 byte thanks to PrincePolka

Input is in the form of number of command-line arguments. No arguments counts as no input.

main(i){printf("%*d",34*--i?:68);}

Try it online!

Python 2, 12 Bytes

print 18**19

Outputs 708235345355337676357632 which is 24 characters.

Befunge-93, 25 - 25 = 0 bytes

&+:0\`3*+::%+"CG"*:*:.:*.

Try it online!

Uses no control flow instructions! This code is implicitly looped n amount of times.

To get the n as input once and not have it interfere with subsequent iterations, we use Befunge-93's feature of returning -1 for input if the input stream is empty. At the start of each iteration, the top of the stack is the loop counter. It starts off at 0 (the default value on the stack). &+ gets a value from input and adds it to the counter. Conveniently, this sets the counter to the received input on the first iteration, and subtracts 1 on every subsequent iteration, creating a for (i = input();; i--) loop. :0\`3*+ computes (counter < 0) * 3 and adds it to the counter. This has the effect of adding 3 if the counter is negative (which happens if there was no input and we want to set n to -1+3=2), and otherwise adding 0 (if the input was positive or this is not the first iteration).

::%+ simply calculates counter % counter and discards the result, so as to halt when the counter reaches 0.

At the end, we output two large numbers by repeatedly squaring the product of two ASCII characters. Note that after each outputted number there is a trailing space.

Aheui (esotope), 87 bytes

삭밦밢따밥다사바바바바바바우a
샥ㅇ뱟ㅇ탸ㅇ뺘소처희ㅇㅇ아멍a

Try it online!

output is 174 bytes of 0. Aheui program is written in Korean, so one character is 3 bytes, and question said measured in byte, so 174. Trailing a is for making program to proper bytes.

How does this work?

삭밦밢따밥다 : to stack , then put 58. (28 Korean characters. Aheui cannot put 1 to stack, so I'll subtract 2 instead of 1 when counting loop.)

사바바바바바바우 : to stack (Nothing), put 6 zeros, than move downside.

아멍 : print from current stack till nothing left. if nothing left, move to start of the line.

샥ㅇ뱟ㅇ탸ㅇ뺘소처희 : to stack , subtract 2, check if zero, halt if zero, to stack (Nothing) and move to 사바바바바바바우 again.

a : At first, I thought this code would work just fine, but something went wrong. I used online character counter, and I got 29, so I made code with that. But code was 85 bytes and output was 174 bytes. I found the reason of this error : newline character. So I added 2 bytes to my code, than everything works fine. Aheui don't evaluate non-Korean characters, so a is just blank.

Python 3, 37 14 bytes

print('a'*27)

Deadfish~, 5 bytes

You expected a worthwhile submission, but it was ME:

{dio}

Try it online!

Prints the number "1" ten times.

TinCan, 122 bytes

# 62367, A, &                          #
# -256, A, -1                          #
# 0, A, 1                              #

Outputs 244 'a's.

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Try it online!

Explanation:

Lines have a minimum length of 40 characters in TinCan, and there is only one instruction, so 40 bytes would be the shortest feasible TinCan program other than an empty file.

TinCan's interpreter is written in PHP and uses the PHP chr function to output the character value of each number on the stack when the program ends. This also works for values outside the range of 0 to 255, using bitwise and with 255 to get the result.

For this program, I multiplied the length of the program (122 bytes) times two, minus one for the positive case, times 256 and added (256 - 97), 97 being the ASCII value of 'a'. This gives 62367.

The loop then generates a sequence of values starting at -62367 and counting upwards by 256 each iteration. Each value in sequence when processed by chr produces another 'a'. When the variable A becomes positive, the program exits and prints 244 'a's.

With the fixed line length, golfing this down would require removing one whole instruction, which I don't believe is possible. But I'd be happy to be proven wrong!

Excel Formula, 23 - 25 = -2 bytes

=REPT("A",MAX(A1,2)*23)

However, this doesn't work for A1 (n) = 1(!)

Version supporting N=1, 28 - 25 = 3 bytes

=REPT("A",(A1=0)*56+(A1*28))

Clam, 4 bytes

p^97

Try it online!

Not very interesting.

Outputs 4782969 followed by a newline

Explanation:

p      - Print next token's value
 ^     - Exponent operator on next 2 tokens
  9    - Literal 9
   7   - Literal 7

9^7 = 4782969

C++ (gcc)

without bonus: 57 bytes

#include<cstdio>
int main(){for(int i=57;i--;)puts("x");}

Try it online!

with bonus: 77 bytes (= Score 52)

#include<cstdio>
int main(){int i;scanf("%i",&i);for(i*=77;i--;)putchar(46);}

Try it online!

Bash, 10 bytes

yes|head -

outputs 10 lines of ys for 20 total bytes output.

Husk, 13 bytes - 25 = -12

R'A*13→←`↓ΘN←

Try it online! (Try it with no arguments!)

(Both TIO links use capital xi instead of A because it looks cooler, but since I just realized that output has to be ASCII and xi isn't exactly ASCII although it is one byte in Husk's code page, the "canonical" program here uses A instead.)

I tried to come up with a well-thought-out and enlightening explanation of why Husk's overload resolution for built-ins doesn't support distinguishing type signatures by number of arguments alone, but I couldn't quite get it right and it took long enough just to write the solution. Suffice it to say, it doesn't, so I had to get a bit creative.

The first part functions the same with and without an input:

R           Repeat
 'A         capital A (could be any character)
    13      (thirteen
   *         times
      →      (one plus
       ←      the first element of
              whatever expression we get to the right of this))
R           times.

The rest of the program handles the defaulting behavior, by exploiting 's possession of overloads for using either a function or a number to drop a prefix from a list.

Explained with an input:

   N     The infinite list of the natural numbers
  Θ      with a zero tacked on to the beginning
`↓       with the first
         (input
    ←     minus one)
`↓       elements removed.

Without an input:

   N     The infinite list of all natural numbers
  Θ      with a zero tacked on to the beginning
`↓       without the largest prefix every element of which
    ←    is not equal to 1.

A version which elects to not take the bonus:

Husk, 2 bytes

←.

Try it online!

Husk assumes that, in the absence of any digits on the left of the radix point, a single 0 is meant, and in the absence of any on the right, a single 5 is meant. So, it is possible to write 0.5 as just .. 0.5, as a string, is three bytes long (and so is 1/2, which is what actually gets printed), so to add a byte, subtract 1 for -0.5 (although what we actually print is -1/2).

←     Subtract 1 from
 .    0.5.

A longer and sillier no-input version:

Husk, 3 bytes

ss"

Try it online!

Prints "\"\"".

s      The string representation of
 s     the string representation of
  "    the empty string.

A version which must take input, having no valid type if it doesn't take an input, and thus neither does nor doesn't take the bonus, failing to comply with the challenge at all:

Husk, 4 bytes (invalid but here anyways, would be -21 with bonus)

*s"¨

Try it online!

Prints n copies of "\"".

 s      The string representation of
  "     the string containing
   ¨    a single "
*       repeated n times.

8088 machine code, IBM PC DOS, 35 bytes

Unassembled listing:

        _LOOP:     
AC          LODSB               ; load byte [SI] into AL, increment SI 
8A F0       MOV  DH, AL         ; save original byte in DH 
B9 0204     MOV  CX, 0204H      ; set up nibble counter and shift count 
D2 C0       ROL  AL, CL         ; reverse nibbles (display high order first) 
        _NIB:      
24 0F       AND  AL, 0FH        ; mask low nibble 
3C 0A       CMP  AL, 0AH        ; is < 10? 
72 02       JC   _ASC           ; if so, is a numeric digit 
04 07       ADD  AL, 07H        ; otherwise adjust for A-F hex ASCII 
        _ASC: 
04 30       ADD  AL, '0'        ; ASCII convert 
B4 0E       MOV  AH, 0EH        ; BIOS output char function 
CD 10       INT  10H            ; display char 
8A C6       MOV  AL, DH         ; restore original nibble to AL 
FE CD       DEC  CH             ; decrement nibble counter 
75 EC       JNZ  _NIB           ; if > 0, repeat 
81 FE 0123  CMP  SI, OFFSET _EF ; is SI < last byte? 
7C DE       JL   _LOOP          ; if so, keep looping 
C3          RET                 ; return to DOS 
        _EF EQU $               ; get program size 

This is a complete IBM PC DOS executable that displays itself as ASCII hex, so will always output as twice the program size.

Output

enter image description here

Download and test SELF.COM!

Guile (5)

"oof" outputs $1 = "oof"

Brainfuck, -5 bytes

,[>++++<-]>[.....-]>

Input is provided in binary.

Similar to anatolyg's solution, this program corresponds to the minimal solution of a*b=10+a+b+c.

Boolfuck, 21 bytes

+[[>+>+[<;;;]<]>+>>]>

This program outputs 330 bits (41.25 bytes) which get buffered to 42 bytes. I found it by systematically (but not quite exhaustively) searching through several million possible candidates.

Here is a hexdump of the output:

00000000: fc0f ffe3 ffc7 ffff ff1f fe3f ffff f8ff  ...........?....
00000010: ffff ffff c0ff fe3f ffff ff1f ffff ffff  .......?........
00000020: ff1f ffff ffff ffff fe00                 ..........

Try it online!

I also recommend taking a look at this in fatiherikli's Brainfuck visulizer (optimized and with minimal delay of course).

ink, 1 byte

s

Try it online!

Outputs s and a newline for a total of two characters.

INTERCAL, 32 bytes

PLEASE,1<-#64DOREADOUT,1DOGIVEUP

Try it online!

Prints 64 null bytes and takes no input. If you like your output printable, the next version is for you:

INTERCAL, 45 bytes

PLEASE,1<-#90DO,1SUB#1<-#4DOREADOUT,1DOGIVEUP

Try it online!

This is one of those rare cases where C-INTERCAL’s “Turing Tape” I/O is actually helpful. Essentially, what it does is for each value in an array, rather than directly print the corresponding character, is subtract the value from the previous value (starting at 0) mod 256, reverse the bits, and then print that, for every value up to the end of the array. So to print a string of a certain length, you just need to READ OUT an array of that size, and to make it more than just a bunch of null bytes, you only need to set the first element of the array and it’ll print a bunch of something else instead: here, setting the first value to 4 prints 90 question marks, since 0 - 4 mod 256 ≡ 252 = 0b11111100 which is 0b00111111 = 63 backwards, and since every cell in the array after the first has a 0 in it the byte which gets printed never changes on account of that 252 - 0 is still 252.

A version with the bonus which prints null bytes:

INTERCAL, 67 bytes - 25 = 42 (except it can't default to 2)

DOWRITEIN.1DO.2<-#67DO(1530)NEXTPLEASE,1<-:1DOREADOUT,1PLEASEGIVEUP

Try it online!

A version which prints question marks instead:

INTERCAL, 80 bytes - 25 = 55 (except it can't default to 2)

DOWRITEIN.1DO.2<-#80DO(1530)NEXTPLEASE,1<-:1DO,1SUB#1<-#4DOREADOUT,1PLEASEGIVEUP

Try it online!

Uses a call to syslib for multiplication of the input with 80 into :1. (Also note that INTERCAL’s native number input format is the digits of a number spelled out with a trailing newline.)

Come Here, 39 bytes

CALL"9999999999999"iTELLi i i i i iNEXT

Java, 86 bytes

Prints 172 (86*2 = 172) null bytes to STDOUT

interface A{static void main(String[]a){System.out.print(new String(new char[172]));}}

Try it online!

Tamsin, 40 bytes

main='aaaaaaaaaaaaaaaa'->T&''+T+T+T+T+T.

Try it online!

Outputs 80 of the character a.

Perl 6, 17 - 25 = -8 points

print e x(get||2)

Try it online!

Prints the builtin constant e (\$2.718281828459045\$) either input or 2 times. Luckily, the precision of the constant is 17 bytes long, exactly the same as my code length.

Explanation:

print              # Print without newline
      e            # The constant e (2.718281828459045)
        x(      )  # String multiplied by
          get      # The input
             ||2   # Or two if the input does not exist

Perl 6 (8 bytes)

say 1e14

Perl 6 (with challenge, 27 bytes - 25 = 2)

print "a"x(@*ARGS[0]//2)*27

Python 3, 26 25 Bytes

lambda n=2:print(n*26*'-')

Improved thanks to @JoKing

C# (Visual C# Interactive Compiler), 17 16 bytes

Write($"{0,32}")

Thanks to Jo King for saving one byte!

Try it online!

MIPS, 58 bytes

main:li $v0,1
li $a0,63
l:sub $a0,$a0,1
syscall
bnez $a0,l

Try it online!

A counter loop that prints the count on each pass without spaces or a trailing newline.

SNOBOL4 (CSNOBOL4), 58 bytes - 25 = 33

	N =INPUT
O	OUTPUT =1
	X =LT(X,N * 29 - 1) X + 1	:S(O)
END

Try it online!

Runic Enchantments, 10 bytes -25 = Score: -15

"9q2i{S*$;

Try it online!

Program reads a string literal (effectively its own source), concats a 9, pushes a literal 2, and attempts to read input.

Reading input and there being no input to read causes the next two commands, {S, to be NOP. This leaves the literal 2 on top of the stack. If there was input, the input ends up on top and the literal 2 on the bottom. Non-numerical input has undefined behavior.

Then multiplication between the integer on the top of the stack with the next item (the string) duplicates it n times (Python style). String is exactly the length of the program, being almost a quine, with 9q putting a 9 on the end substituting for the missing " from the beginning. $; prints only the resulting string and terminates (discarding any remaining literal 2 if input was taken).

Brachylog, 10 bytes - 25 = -15

{2|};Ṿj₍jw

Try it online!

         w    Print
     Ṿ        "aeiou"
      j       concatenated with itself
 2            two
{ |}          or whatever else the input is
    ;  ₍      times
        j     concatenated with itself again.

A version without the bonus:

Brachylog, 3 bytes

ẈẈw

Try it online!

Bypasses the ban on unnecessary whitespace by using unnecessary variable unification instead.

  w    Print
 Ẉ     the built-in constant "aeiouy" which is
Ẉ      the built-in constant "aeiouy".

A version without any silly redundancy:

Brachylog, 4 bytes

1j₈w

Try it online!

   w    Print
1       the digit 1 (could be any digit other than 0)
 j      repeated
  ₈     eight times.

PowerShell, 3 bytes

1e4

Try it online!

PowerShell, 1 byte

Thanks to @mazzy for pointing this one out!

1

Try it online!

Both programs' outputs includes a trailing newline!

Z80Golf, 14 bytes - 25 bytes of bonus = 11 anti-matter bytes (-11 classic bytes)

00000000: 3e02 cd03 8006 0eff 10fd 3d20 f876       >.........= .v

Try it online!

Takes input as a byte value.

    ld a, 2
    call $8003
outer:
    ld b, 14
inner:
    rst $38
    djnz inner
    dec a
    jr nz, outer
    halt

Java, 234 - 25 = 209 bytes

import java.io.*;interface A{static void main(String a[])throws Exception{InputStream i=new FileInputStream("A.java");byte[]b=new byte[1];for(int l;(l=i.read(b))!=-1;)for(int n=0;n<Integer.parseInt(a[0]);n++)System.out.write(b,0,l);}}

Formatted :

import java.io.*;
interface A {
    static void main(String a[]) throws Exception {
        InputStream i = new FileInputStream("A.java");
        byte[] b = new byte[1];
        for (int l; (l = i.read(b)) != -1; )
            for (int n = 0; n < Integer.parseInt(a[0]); n++)
                System.out.write(b, 0, l);
    }
}

Ahead, 6 - 25 = -19 bytes

Here it is with the bonus.

I6*kO@

I       Read number from stdin
 6*      multiply by 6
   k    I*6 times...
    O   ...pop and print number
     @  end

Try it online!

Ahead, 4 bytes

8kO@

Prints 00000000.

8k    8 times...
  O   ..pop and print number
   @  end

Try it online!

Python3 Shell version

'2'*10

outputs:'2222222222'

Gol><>, 8 - 25 = -17 bytes

IE28*Rn;

Try it online!

Outputs all 0s.

Explanation:

I        Get inputted number
 E2      Push 2 if no input
   8*    Multiply by 8  (length of code)
     Rn  Print 0 that many times
       ; Halt

Without bonus, 4 bytes

"D;

Try it online!

Outputs [68 59]. Note that both input and output have a trailing newline.

Shakespeare Programming Language, 216 192 191 bytes

Twice the source.Ajax,.Puck,.Act I:.Scene I:.[Exeunt][Enter Ajax and Puck]Ajax:Open heart!You big big big big big big big cat!Puck:You is the sum ofyou a cat!Be you worse I?If solet us Act I!

Try it online!

Prints a 0 followed by 128 128s.

Hummus, 20 bytes (non-competitive)

().(rep('xx',20)).()

Explanation:

().(rep('xx',20)).()   //Empty anonymous function

().                   //Empty parameter declaration 
   (rep('xx',20))     //Repeat 'xx' 20 times
                 .()  //Empty value declaration

In contrast, a non-empty, anonymous function would look like this:

(x).(x*x).(2)

(x).          //Defines x as parameter
    (x*x)     //Defines the output to be x*x or x²
         .(2) //Defines the input of the anonymous function to be 2 (hence the output is 4)

Alternative, 2 bytes:

!0

This works as well and outputs true but since this was posted multiple times already, I found it to be quite a boring solution.

Charcoal, 1 byte

²

Try it online!

Perl 5, 17 - 25 = -8

Tip of the hat to primo for getting me to reread perlvar

die$/x(<>*17||34)

Try it online!

Wolfram Language (Mathematica), 17 bytes - 25 = -8

Echo[10^(17#-5)]&

Try it online!

Assuming giving a function is OK. Prints >> 1, then (17 * input - 5) 0s, then a trailing new line, thus making the output 17 * input bytes long.

C, 36 bytes

main(a){for(a=4;a--;)puts(puts);}//!

Really hacky stuff here. The implementation of puts on my machine (gcc 6.3) has 16 bytes before it hits a null, and adds a newline and SOH (18 bytes total). Run four times, and it's 72 (or 0x48) chars. I padded mine with a 3-char comment to fit that. Most of the chars are unreadable, so here's a hexdump of the output.

0000000 5541 5441 8949 55fc 4853 ec83 e808 76ae
0000010 0a01 5541 5441 8949 55fc 4853 ec83 e808
0000020 76ae 0a01 5541 5441 8949 55fc 4853 ec83
0000030 e808 76ae 0a01 5541 5441 8949 55fc 4853
0000040 ec83 e808 76ae 0a01
0000048

Rebol, 24 bytes

copy/part mold system 48

Prints the first 48 characters of the system object.

Also works with the Red language

Minecraft Functions (18w15a, 1.13 snapshots), 26 bytes

Uses one function named ab

ab

function ab
tp @e ~0 ~0 ~0

It just recurses until it hits the default limit of 65536, at which point it outputs Executed 65536 commands from function 'minecraft:ab'

Ruby, 18 Bytes

I am lazy to make the input thing. So take the *2.

36.times{print"a"}

JavaScript REPL, 24-25 = -1 bytes

Array(24*prompt()||48)+0

JavaScript function, 20-25 = -5 bytes

(n=2)=>Array(20*n)+0
n=>Array(20*n||40)+0

Just how no one post this?

Whitespace, 38 36 bytes

SSTTTSTTNNSSNSNSTNSTSSSTNTSSSSNSNTTN

Try it online!

Prints "-27-26-25-24-23-22-21-20-19-18-17-16-15-14-13-12-11-10-9-8-7-6-5-4-3-2-1". Whitespace doesn't have optional input so I can't go for the bonus.

Brain-Flak, 30 bytes

([()()()()()]){((((({}))())))}

Try it online!

Prints three 0s, four each of -1 through to -4 and two -5s, each separated by spaces.

With bonus: 62 - 25 = 38 bytes

({{}[()()]}()()){({}<((()()()()()){}){({}(([()])))}>[()])}{}  

Try it online!

Outputs n*(20*"-1 "+"0 "). There are two extra spaces to pad it out to 62 bytes.

How It Works:

({{}[()()]}()()) Add a 2 to the stack if there is no input
{ Outer loop
  ({} Pop the outer loop counter
  <
  ((()()()()()){}) Add a 10 to the stack
  { Inner loop
    ({}(([()]))) Decrement the inner loop and add two "-1"s to the stack
  }
  > Discard the inner value
  [()]) Decrement the outer loop counter
}
{} Pop the excess 0

Attache, 11 bytes

10^20|Print

Try it online!

Attache (bonus), 36 - 25 = 11 bytes

(Safely[ReadInt][]or 2)*36*$x|Output

Try it online!


Uh. Both come out to be the same byte count. So there's that.

Befunge-98, 12 - 25 = -13 bytes

j& 6*1-k.@>2

Try it online!

Prints the correct amount of 0s, each with a trailing space.

How It Works:

j  No effect
 & Gets input. If no input, reflect
         >2 If it reflected put two 2s on the stack 
j  Use one of the 2s to jump past the &
  6*1- Multiply by 6 (length/2) and subtract 1 because it prints an extra 0 later
      k.@ Print that many 0s and end the program

F#, 46 bytes

let[<EntryPoint>]m a=
 printf"%A"[|10..31|]
 0

Try it online!

Prints out:

[|10; 11; 12; 13; 14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30; 31|]

which is 92 bytes long.

Japt -P, 3 - 25 = -22 bytes

õ@L

Try it online!

How it works

Uõ@L

Uõ  Create range of [1..input] inclusive, and map...
@L  the function that returns the constant 100.

The õ generates [1,0] for no input (implicit zero) and [1,...,n] for positive integer input, which perfectly fits with the default=2 requirement.

The -P flag prints the resulting array with no separator, so the output length is exactly 3 times the length of the array.

JavaScript (Node.js), 22 - 25 = -3 bytes

(x=2)=>''.padEnd(22*x)

Try it online!

If we require an alert-type output, this can be managed in 29 bytes - 25 = 4 points:

(x=2)=>alert(''.padEnd(29*x))

Versions without bonus (7 bytes):

x=>1e13

And with output as alert (12 bytes):

alert({}+$4)

Or without special console variables (14 bytes):

alert({}+1e12)

Fission, 7 6 bytes

'#ORR"

This is a variation on a standard Fission quine. With two R's it creates two atoms and reads through the program twice.

Outputs ''##OORRRR##

Try it online!

-1 byte thanks to Jo King

Implicit, 1 byte

a

Pushes the ASCII character code for a (97). Implicit output. Try it online!

Java, 90 bytes

class T{public static void main(String[]a){for(int i:new int[90])System.out.print("##");}}

05AB1E, 7 - 25 = -18 bytes

Saved a byte thanks to Okx.

YI7*ð×?

Try it online!

Explanation

Y       # push 2
 I      # push input
  7*    # multiply top of stack with 6 (program length)
    ð×  # repeat <space> that many times
      ? # print top of stack

LibreLogo, 21 bytes

Code:

input_half_the_length

Result:

Unknown name: ‘input_half_the_length”.

enter image description here

SmileBASIC, 24 18-25= -7 bytes

N=2INPUT N?@A*N*9;

In SmileBASIC, labels (@LABEL) are treated as string literals in expressions, so you can make a 2 or more character long string without any quotes. Then it just has to print @A N*9 times to get the correct length.

Without bonus, 6 4 bytes

?1E7

There is a line break after the output, but technically no character is printed to the screen (it is different than if you just printed CHR$(10))

BASH + coreutils, 22 (-25) = -3 bytes

printf %$[${1:-2}*22]d

Pass repeat count as 1st argument. Omit argument to default to 2 repeats.

Scala, 35 bytes

object X extends App{print("X"*70)}

Try it online!

Japt, 1byte

My previous solution-with-bonus was invalid as I missed the requirement that input should default to 2. This is a stop-gap until I have a few minutes to come up with something better.

A

Output: 10

Try it online

B-G would also work, outputting 11-16 respectively, as would H (32), I (64) & J (-1).

Slightly less trivial solutions include (1000) and 8³² (262144), among many others.

RProgN 2, 8 - 25 = -17

2)i‘8*x*

Try it online!

Explained

2)i‘8*x*    #
2           # Push two to the stack.
 )i‘        # Create a stack from the registry stack, inverse it, and pop the top value. If an argument is provided, it will use that, otherwise, it will use 2.
    8*      # Multiply it by 8 (The length of the code)
      x*    # Multiplied by the string "x".

Pyth, 10 9 - 25 = -16

-1 by Dennis

**N9?zvz2

Prints [input]*9 quote characters, or 2*9 if the input is empty.

isaacg has a shorter answer here

Pyth, 1 byte

T

Prints 10. It's a built in variable that initializes to 10.

JavaScript ES6, 33 - 25 = 8

(a=2)=>Array(a*33).fill(0).join``

Try it online!

Windows Batch, 148 144 73 30 bytes

@echo %OS%%OS%%OS%%OS%%OS%%OS%

The %OS% system variable should be Windows_NT on most Windows NT systems.

6 of this %OS%(i.e. Windows_NT) is exactly 60 character, which is codeLength * 2.

Jq 1.5, 1 -9 -10 -1 bytes

range(inputs?//2)|23*"a"

Source is 24 bytes (-1 with bonus). Sample runs

Sample run with no input (defaults N=2)

$ jq -Mrn 'range(inputs?//2)|23*"a"' </dev/null
aaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaa

Confirm character count with no input (defaults N=2)

$ jq -Mrn 'range(inputs?//2)|23*"a"' </dev/null | wc -c
      48

Sample run with N=4

$ jq -Mrn 'range(inputs?//2)|23*"a"' <<< "4" | wc -c
      96

Verify length of program

$ echo -n 'range(inputs?//2)|23*"a"' </dev/null | wc -c
      24

Jq 1.5, 1 byte

1

Sample Run

$ jq -Mnr 1
1
$ jq -Mnr 1 | wc -c
       2
$ echo -n 1 | wc -c
       1

Mathematica REPL, 1 byte

#

Prints #1.

dc, 4 bytes

1dff

prints

1
1
1
1

TIO

VBA, 2 1 -3 20 - 25 = -5 Bytes

?Spc([Max(A1,2)*20])

Which outputs [A1] (analagous to n) else 1 times 22 (length of the code) spaces

Previous Version 1 Byte

?

Output

 

Pyke, 3 bytes -25 = -22

2|S

Try it here!

2|  -  input or 2
2|S - range(1, ^)

Pyke, 5 bytes -25 = -20

2|}hV

Try it here!

Pyke, 1 byte

T

Try it here!

Outputs 10

TI-BASIC, -20 bytes

10^(5Ans-1

As Julian Lachniet mentioned in a comment on his answer, TI-BASIC does not accept empty input, so I guess this is TECHNICALLY 5 bytes.

Note that 10^( is only one byte, as is Ans.

All this does is print a power of ten with 5Ans digits.

Ly, 17 - 25 = -8 bytes

"9>n[<&s&ol>1-]<;

Try it online!

A simple quine variant. Outputs 9>n[<&s&ol>1-]<; input times. (there's a tab at the end)

3 bytes, no bonus

"&|

Outputs:

38 124

Try it online!

Java 8, 16 15 bytes

Golfed a byte by using a for loop instead of a while loop. (back to where I was before :P)

u->{for(int x=0;++x<40*u;)out.print(1);}

Using a static import to reduce the code by 7 bytes, this prints out 1 40u times, where u is the integer taken from input. Since the program code is 40 bytes long and I incorporated the bonus, that leads me with 40 - 25 = 15 bytes.

Try it online!

TI-Basic, 2 bytes

::

(Ab)uses the fact that programs output Done when nothing is evaluated on the last line.

Python 2, 28 bytes

Quick and simple, also unimaginative.

This prints 1 14 times, separated by spaces, and a newline at the end.

for i in range(14):print 1,

Try it online!

Note: the newline in the code is required, otherwise it won't run.

QBIC, 16 - 25 = -9 36 - 25 = 11 32 - 25 = 7 bytes

:~a|q=a][q*4|?@ABCDEFGHIJKLMNOP

Explanation:

:           Get a cmd line paramenter 'a'
~a|         IF a <> 0 THEN
q=a]        set q to the value of a
            If we don't hit that IF-branch, q will be 1 by default in QBIC
[q*4|       And execute the following 4 times for each 'a/q'
?@QBICFTW!IJKLMNOP  Print this 16-byte string literal

The code is 16 bytes boilerplate and 16 bytes repeated output. Printing that output four times = 16x4 = 2x32 = double my source code length. And it accepts an input that does this N times.

Bash, 5 bytes

seq 5

Output (with a newline char on the end of each gives 10 bytes)...

1
2
3
4
5

><>, 15 + 2 (-v flag) - 25 = -8 bytes

2{f*:?!;0n1-30.

Explanation:

2{ puts 2 at the bottom of the stack. If no input was provided, this means it is at the top. Otherwise, the provided input will be at the top.

f* multiplies the input by 15 (the length of the program)

We then go into a loop: :?!;0n1-30.

:?!; ends the program if the counter is 0.

Otherwise, 0n prints 0, 1- decrements the counter, and then 30. goes back to the start of the loop.

Check, 14 - 25 = -11 bytes (non-competing)

.>2\&"?"*>14*o

Explanation:

.>2\& puts 2 at the back of the stack. If there were no arguments passed, this means 2 is at the top of the stack. Otherwise, the passed input is on top of the stack. We then repeat the character ? as many times as the stack number, and then repeat the result 14 times, and then output it.

bash, 11 bytes

Here's a pleasingly ironic usage of a data compression tool :) ...

gzip -f<<<2

Here's a hex dump of the output (22 bytes)...

0000000: 1f 8b 08 00 e3 ce 32 59 00 03 33 e2 02 00 90 af  ......2Y..3.....
0000010: 7c 4c 02 00 00 00                                |L....

Braingolf, 1 byte

Prints 0 and a newline.

l

Try it online!

Explanation

l

l      push length of the stack to the stack
       implicit output
       implicit newline printed at end of program

Forth (gforth), 36 - 25 = 11 bytes

: x depth 0= if 2 then 36 * spaces ;

How it works:

Checks if no value is on the stack (depth 0=). If that is the case, push 2. Then just print n * 36 spaces.

Forth (gforth), 2 bytes

.S

Only works if the stack is empty. Prints <0> (<, 0, > and space)

Fourier, 12 - 25 = -13 bytes

Non competing: Fourier is newer than the challenge

I*12(1oi^~i)

Try it on FourIDE!

Explanation pseudocode:

For i = 0 to (Input * 12)
    Print 1

Pari/GP, 2 bytes

7!

Prints 5040 in the REPL.

REXX 33 Bytes -25 = 8

say copies("x",max(2,"0"arg(1))*33)

Powershell 4 Bytes

,1*8

This prints '1' 8 times in the console window.

05AB1E, 6 - 25 = -19 bytes (noncompeting)

VžOY×?

Try it online!

VžMY×?  Argument n
V       Assign n to Y, if n is empty Y defaults to 2
 žO     Push 'aeiouy' to stack (has same length as program)
   Y×   Repeat the string Y times
     ?  Print top of stack without newline

PHP, 45 bytes

<?php print number_format(pow(10,66))."a"; ?>

output:

1,000,000,000,000,000,132,394,543,446,603,018,655,781,305,157,705,474,440,625,207,115,776a

<?php              //PHP start tag
print              //Prints what's ahead
number_format(arg) //format what's inside the parentheses as a number, with separators. (Used as escape function for having scientific notation result 
pow(base,exp)      //Gets the value of the `base` raised to the power of `exp`
.                  //Concatenation operator
"a"                //String of "a"
?>                 //End tag for PHP

Fourier - Non-competing, 12 - 25 = -13 bytes

Fourier is newer than this challenge.

I*12(1ox^~x)

Works by multiplying the input by 12 (the length of the program) and outputting the number 1 that many times.

Try it online!

k, 2 bytes

This is one byte, but I don't like the answer because it doesn't feel "proper".

1

When run in oK as a file (as opposed to interactively) it prints out a newline after printing the 1.


Another sort-of cheating answer:

11

If run in the closed-source k interpreter, it would output 11 followed by a newline and a space (and it would expect the next command).


$1

This would result in ,"1" if trailing whitespace was not counted.

Excel,10 Bytes

=pi()&1234

prints 3.141592653589791234

J, 2 bytes

!7

Prints 7 fatorial, or 5040.

If you include the trailing newline then use:

!6

Which would print 720.

Alice, 10 bytes - 25 = -15

2/
&oi@/a*

Try it online!

Prints a 0x02 byte and 10n-1 null bytes when given an argument n, and simply 20 null bytes when no argument is given.

Explanation

2   Push 2 as the default input.
/   Reflect to SE. Switch to Ordinal.
i   Read all input as a string. Pushes "" if no input is given.
    Reflect off bottom boundary, move NE.
    Reflect off top boundary, move SE.
/   Reflect to E. Switch to Cardinal
a   Push 10, the length of the source code.
*   Multiply. The first argument this pops is 10. But two pop another integer 
    argument, some implicit conversion needs to happen. If an input was given,
    that string is popped and converted to an integer, which will be used as
    the second argument. But if no input was given, the value "" contains no 
    integers, so it's discarded and Alice pops the next value instead (the
    default value 2 we pushed earlier).
    IP wraps around to the first column.
&   Repeat the next command that many times.
o   Pop that many values and print them as bytes.
i   Try to read more input, irrelevant.
@   Terminate the program.

Some alternatives

Without the bonus, we can do this in 4 bytes, printing 8 null bytes:

8&o@

Simple enough. There's a really fun and 6 byte solution with readable output though:

 /
O@n

This prints Jabberwocky with a trailing linefeed. The reason is that n is logical not, and the "canonical" truthy (non-empty) string used by Alice when applying this command to a falsy (empty) string is "Jabberwocky". So...

/   Reflect to SE. Switch to Ordinal.
n   Logical NOT. Pops an implicit empty string from the stack and turns it into
    "Jabberwocky".
    Reflect off bottom right corner, move back NW.
/   Reflect to W. Switch to Cardinal.
    IP wraps around to the last column.
/   Reflect to NW. Switch to Ordinal.
    Reflect immediately off top boundary, move SW.
O   Print "Jabberwocky" with a trailing linefeed.
    Reflect off bottom left corner, move back NE.
/   Reflect to S. Switch to Cardinal.
@   Terminate the program.

Try it online!

Haskell, 25-25 = 0 bytes

f n=putStr$[1..25*n]>>"*"

prints n*25 Asterisks

ForceLang, 13 bytes

io.write 1e25

Processing, 31 29 bytes

for(int i=1;i++<34;)print(i);

I stumbled upon this submission from long ago and decided that it can be golfed more.

Outputs all the integers from 2 to 34 in a single line (58 bytes).

2345678910111213141516171819202122232425262728293031323334

Java - 132 - 25 = 107 bytes

interface o{static void main(String[]a){int i=2,k=0;if(a.length>0)i=Integer.parseInt(a[0]);for(;k<132*i;k++)System.out.print('X');}}

Takes one number(Supposed to be a number, NumberFormatException otherwise) and converts it to an integer, if no input is present, it defaults to 2. Prints X characters.

Ungolfed version:

interface o {
    static void main(String[] a) {
        int i=2, k=0;
        if (a.length > 0)
            i = Integer.parseInt(a[0]);
        for (; k < 132 * i; k++)
            System.out.print('X');
    }
}

[Non-Competing] C, 16

Code:

//score=16 bytes

Outputs: error: ld returned 1 exit status (32 bytes)

C, 27 25

main(){printf("%50f",0);}

Thanks @Titus for knocking off 2 bytes


And for my non-competing 16 byte solution in C, go here: https://codegolf.stackexchange.com/a/111330/16513

^I say non-competing because the error code could possibly depend on your compiler, Also note I'm using GCC in that solution. Also I'm not certain if it breaks rule 1 or not, I think it probably does so I went ahead and labeled it non-competing

Pushy, 2 bytes

H#

Try it online! - this prints 100 followed by a trailing newline, 4 bytes of output.

H  \ Push 100 to the stack
 # \ Print with a trailing newline

PKod - 6 bytes

Code:
=0+ni6

Explanation:

=0 - Set variable as 0 (ascii code of 0 is 48, thus 48 is stored in the variable)
+n - Add 1 to variable (making it 49 on first iteration) and print ascii char code
i6 - 'i' kicks you back 2 blocks in code (to the '+' sign) until variable equals next char
which is '6'

Output:
495051525354
(note how it prints ascii char code from 1 to 6 (49 50 51 52 53 54) but without spaces.)

Ruby, 24 bytes (with bonus)

->m{m.to_i.times {49.times {print "a"}}}[gets||2]

Kitanai, 35 bytes

$0[70]#?(neq@0)([sub@1]print"!"&1)%

Just a simple loop to print 70 times the character "!".

PHP no bonus, 19 17 16 14 9 bytes

<?=99**9;

prints 913517247483640899

longer versions:

close but no cigar:

PHP, 32 30 bytes -25 = 5

<?=str_pad(_,30*$argv[1]?:60);

prints an underscore, fills up with spaces

fancier, but longer (38 bytes):

<?=date(str_pad(r,3*$argv[1]?:6,MYr));

gives ("rMY" repeated N times) as argument to date(), which returns an RFC 2822 formatted date (e.g. Thu, 26 Jan 2017 23:32:31 -0800, length=31) followed by 3 letters of the month name and the 4 digit year - repeated N times. <?= prints the result.

Juggle, Non-competing, 8 bytes

Golfed: 1<4=a[p]

Ungolfed

1<4    <--- literal for 1 bit-shifted left 4 indices, equal to 16
=a     <--- Set a equal to 16
[      <--- Iterate until a == 0
p      <--- Print a new line
]      <--- Decrement a by 1

This code effectively just outputs 16 \n characters, so there's not much to it.

TI-Basic, -2 bytes

:Input N
:".
:While N23>length(Ans
:Ans+".
:End
:Ans

Python 3, 20 bytes

print('#'*40,end='')

The optional argument end removes the newline. This is necessary due to universal newline support in Python which generates a \n on Linux and \r\n on Windows.

Recall, 17 bytes

................!

16 NOOPs. Then the debugger ! is invoked and dumps the memory to the console. The memory is empty, but the header is 34 bytes long:

-- STATE DUMP --
----------------

Try it here.

s-lang, 30 bytes

t[][sssssssssssssss]t[s][ssss]

Link

Java 8, 82 Bytes

interface A{static void main(String[]s){for(A a:new A[164])System.out.println();}}

Prints out 164 empty lines.

Scala, 52 - 25 = 27 bytes

object A extends App{println("#"*(args(0).toInt*52)}

Simply prints the string # repeated (arg * lengthOfCode) times.

Nim, 27 bytes

echo getStackTrace()[0..51]

Prints the first 53 bytes of the following, plus a trailing newline:

Traceback (most recent call last)
<filename>.nim(1)       <filename>

Note that despite having the filename in the output, this answer's validity is not dependant on the length of the filename. For example, saved in x.nim, this is output:

Traceback (most recent call last)
x.nim(1)         

There are nine trailing spaces there. Conversely, when saved in areallylongfilename.nim, this is output:

Traceback (most recent call last)
areallylongfilena

Newlines are also output in each example. Example usage:

$ nim c length.nim
$ ./length | wc -c
54

Cubix, 10 bytes

Cubix is a 2D esolang with a twist: the source code is wrapped around the outside of a cube.

>..(NU@?O/

Test it online! This maps to the following cube:

    > .
    . (
N U @ ? O / . .
. . . . . . . .
    . .
    . .

The output is

10998877665544332211

Don't even ask how it works... though if you'd like to watch it in action, run it here.

BASH, 19 bytes

54 bytes -25 bonus. Using the variable input for x repeats:

#!/bin/sh
a=$1;for i in `seq 1 ${a:=2}`;do cat $0;done

similar but more readable:

#!/bin/sh
a=$1
for i in `seq 1 ${a:=2}`; do
 cat $0
done

19 bytes for a simple sh script.

#!/bin/sh
cat $0 $0

Python, 24-25= 0 -1 bytes

print'a'*int(input())*24

It takes input, converts it to an integer, multiplies it by 24 (the length of my code) and multiplies the character a by it

Thanks to @EamonOlive for reducing 1 byte

Brain-Flak, 128 bytes

Try it online!(You probably wont be able to finish it before the universe ends)

(((((((((((((()()()){}){}){}){}()){}){({}[()])}{}){({}[()])}{}){({}[()])}{}){({}[()])}{}){({}[()])}{}){({}[()])}{}){({}[()])}{})

How it works

It starts simply by pushing ninety-eight to the stack:

((((((()()()){}){}){}){}()){})

It then implements my Triangulation algorithm:

(*push n*{({}[()])}{})

seven times.

This results in

1447283887869053957595051227533274962011504066726596247765427442496031260270109555118382532157345193860142997726793245725173763195275989332247013823819162395404940274645651775376645319691872778284304403703355308050412897911161964450479105938633399903762942

The program then terminates and spits the contents of the stack to the terminal. Since insert atrociously huge number here is 256 characters long in base 10, the output is exactly twice the source code's length.

As one might tell I used a computer aided search to find this solution. This is almost certainly the shortest solution using the triangulation method I outlined.

V, 2 Bytes

This outputs

ÿÿÿÿ

Try it online!

Explanation

This is a really hacky answer, and it works by abusing the internals of V. Essentially how it works is that ÿ is a command in V that signals the program is over, and any pending commands must complete. Otherwise, some implicit endings would not work, and the interpret would hang more often. This command is automatically sent several times at the end of the program, and most of the time has no effect on the output.

é is a command that inserts a single character. However, it does it by grabbing a raw byte, so it doesn't interpret ÿ as "end", it interprets it as "this is the character you need to insert." makes it insert this character 4 times instead of one.

Perl5, 11 bytes

x is string repetition operator

print 1x22

Desmos, 3 bytes

9^6

Equals 531441

PD, 204 bytes

#N canvas 1 7 1 1 1;
#X obj 1 6 loadbang;
#X msg 1 1 \; pd quit;
#X obj 2 5 print;
#X obj 2 2 metro 10;
#X obj 1 7 del 340;
#X connect 0 0 3 0;
#X connect 0 0 4 0;
#X connect 3 0 2 0;
#X connect 4 0 1 0;

run with pd -nogui patchname.pd 2>&1. The program will print the String print: bang (12 bytes including the newline) every 10ms. Then the program terminates after 340ms which will result in the string being printed 34 times (34 * 12 = 408 Bytes output).

dc, 7 bytes

2oFddnf

2o         Set the output radix to 2: write to stdout using the binary digits [01]
  F        Push 0xF on the stack, equivalent to 1111b
   dd      Duplicate the top-of-stack, then duplicate the top-of-stack: 1111b, 1111b, 1111b
     n     Pop the topmost item from the stack (1111b) and write it (using binary, per
               the above) to stdout. Do not follow with a newline.
      f    Dump the contents of the stack (1111b, 1111b), following each item with a
               newline.

Visible characters comprise 12 bytes; add two (2) newlines for a total of 14.

Edit: Since I'm the only dc answer with a natural number for a score, why not post the following?

dc, 8 bytes

cccccccP

Clears the stack seven times, then attempts to pop the top (non-existent) value and print it as text (i.e., a number with output-radix UCHAR_MAX+1). Since the stack is empty, this results in a fifteen-byte error message followed by a single newline. (Works for GNU dc 1.2)

APL, 3 bytes

1e5

Print 100000...

Java, 85

class A{public static void main(String[]s){for(A a:new A[170])System.out.println();}}

Tellurium, 10 bytes

µa~Åm16.

Outputs a 16 times. Simple enough.

More detailed explanation:

µ         Begins reading a string
a
~         Stops reading a string and stores it in the selected cell
Å         Command set 2
m         Print the cell's value n times
16
.

There might be a shorter version using Åw but I'm too tired to do that :P

JavaScript, 2 bytes

f=(n=2)=>("f="+f).repeat(n)

Batch, 17 bytes

@type %0 %0 2>nul

This one does not require a special locale (as the date solution does)

And it does not require %PATH% to be set. (No environment at all, for that matter)

2>nul is required to supress type to output the filenames on stderr (which it does when more than 1 file is printed)


Currently I couldn't conjure up a f(x)=x*N solution that is shorter than 17+25 bytes

This is the best I could come up with:

@if !%1 == ! (call %0 2) else (for /l %%x in (1,1,%1) do @type %0 2>nul)

Which has a score of (72-25) 45 bytes

PHP, 34 bytes - 25 = 9

$i=34*$argv[1];while($i--)echo"x";

34 bytes generating 34 * $argv[1] characters

2x version, 25 bytes

$i=50;while($i--)echo"x";

25 bytes generating 50 characters

Brian & Chuck, 9 bytes

{?
#.{-?

Try it online! There's a single unprintable \x12 (code point 18) before the first { which gets decremented each iteration, giving an output of 18 ?s.

Hexagony, 6 bytes

o!!!!@

Prints

111111111111

Try it online!

Explanation

Probably one of the simplest Hexagony programs I've written. The unfolded code is

 o !
! ! !
 @ .

and is simply executed in reading order. o sets the current memory edge to 111 (any letter from d to z would do). Then the ! print that four times and @ terminates the program.

I might try for the bonus later, but I have some doubts that it will fit in side-length 4 (and side-length 5 might end up costing more than the bonus gives).

Labyrinth, 10 bytes - 25 = -15

Another Labyrinth collaboration with Sp3000.

?02
`\
~"@

This prints 10n linefeeds to STDOUT.

Try it online!

Explanation

The most interesting part is probably how the default value of 2 is handled.

If an input number is given, the following code is executed:

?   Read integer from STDIN.
0   Multiply by 10. This is because digits in Labyrinth work by multiplying the top of
    the stack by 10 and then adding themselves, such that multi-digit numbers can be
    written into the code more easily.
    The top of the stack is now positive (and contains the number of characters to be
    printed) so the instruction pointer (IP) turns right/south towards the \.

If no input number is given, ? pushes a 0 instead, and this happens:

?   Push 0.
0   Multiply by 10, which is still 0. Since the top of the stack is now 0, the IP
    keeps moving forward/east instead.
2   Multiply by 10, add 2, which sets the top of the stack to 2. The IP hits a
    dead end so it turns around.
0   Multiply by 10 to give 20. Now the top of the stack is positive and IP
    turns left/south towards the \. Again, the top of the stack is the number
    of characters to be printed.

Now all we need to do is print one character each while decrementing the top of the stack to zero. The cheapest character to be printed in Labyrinth is a linefeed, because \ prints one without affecting the stack at all. As an additional trick, we decrement via multiply by -1, bitwise NOT, to ensure that the top of the stack is negative in the top left corner of the loop (otherwise the IP would move towards the ? again).

The loop is then simply:

\   Print linefeed.
`   Multiply by -1.
~   Bitwise NOT.
"   No-op. This cell acts a junction. While the top of the stack is positive
    the IP will turn left/north, otherwise it will move forward/east.

When the IP leaves the loop it hits the @ which terminates the program.


For completeness, here are also two 7-byte versions without the bonus:

7:(
@`!

prints

-7-6-5-4-3-2-1

Try it online!

And

>11!:
@

prints

11001011111011

Try it online!

The former is a very simply (but compact) loop which prints -n while decrementing n from 7 down to 0.

The latter is a simple modification of Sp3000's solution to this challenge (which makes the execution a little bit crazier though).

Lua, 35 - 25 = 10 bytes

Takes input from the command line, which is in the varargs.

print(("n"):rep(35*(...or 2)-1))

Underload, 12 bytes

(\/)a:*::**S

Outputs

(\/)(\/)(\/)(\/)(\/)(\/)

Try It Online

Explanation

(\/)            # push \/ to the stack        : \/
    a           # add brackets to TOS         : (\/)
     :*         # duplicate the TOS and join. : (\/)(\/)
       ::       # duplicate a couple of times : (\/)(\/)<>(\/)(\/)<>(\/)(\/)
         **     # join stack items            : (\/)(\/)(\/)(\/)(\/)(\/)
           S    # output TOS

Pylongolf, 2 bytes

.;

. - Reset the stack
; - Debugally print both the stack and the variables.

The interpreter I use prints debugally by converting an 2 arrays into a string which has that string begin with [ and end with ] which prints:

[][]

J, 6 5 3 2 bytes (bonus: -11 bytes) (try it online)

Program:

%4

Output:

0.25

Explanation: The reciprocal of 4.

Bonus:

10,1$~_1+7*]/2

Testcases:

10,1$~_1+7*]/2    :10 1 1 1 1 1 1 1 1 1 1 1 1 1
10,1$~_1+7*]/2 2  :10 1 1 1 1 1 1 1 1 1 1 1 1 1
10,1$~_1+7*]/2 3  :10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

Explanation:

10,               NB. prepend 10 to
   1$~            NB. the "~" reverses the arguments.
                  NB.    e.g. 1 $~ 5 becomes 5 $ 1.
                  NB.    5 $ 1 means create an array of size 5,
                  NB.    using the number 1. The number is
                  NB.    recycled because there is not enough number.
                  NB.    For example, 5$1 2 3 would produce 1 2 3 1 2.
      _1+         NB. add negative one to
         7*       NB. seven multiplied by
           ]/2    NB. if the input is 5, then this part
                  NB.    becomes 2]5, which evaluates to 5.
                  NB.    if there is no input, then this
                  NB.    part is only 2.

3-byte attempt:

7^7

Output:

823543

Explanation: 7 raised to the power 7.

Notes: Looks like I am not the first one to discover this.


5-byte attempt:

Program:

*:i.5

Output:

0 1 4 9 16

Explanation: *: means square. i.5 means generate a list from 0 to 4


6-byte attempt:

Program:

10,5$5

Output:

10 5 5 5 5 5

Explanation:

5$5 means create an array of size 5 (on the left of $), using the number 5 (on the right of $). The number is recycled because there is not enough number.

For example, 5$1 2 3 would produce 1 2 3 1 2.

Lua, 20 bytes (bonus: 11 bytes)

Program:

print(("a"):rep(40))

Output:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

(Change 40 to 39 if newline is counted)

Bonus:

print(("a"):rep(36*(io.read()or 2)))

(If newline is counted, use print(("a"):rep(38*(io.read()or 2)-1)) [13 bytes] instead.)

Cubix, 15 bytes

Non competing due to language age.

While having some fun with @ETHproductions language, I thought this would be interesting. It turned out a little longer than I thought it would and I'm sure it can be improved.

(.O.NU.\!@O$..u

This maps to a cube with edge length 2

    ( .
    O .
N U . \ ! @ O $
. . u . . . . .
    . .
    . .

Outputs

109998887776665554443332221110

N push 10 to the stack
U turn left moved forward turn left
O output number of TOS
$ skip a no op
( decrement TOS, followed by a number of no ops
u turn right, move forward and turn right, more no ops
O output number of TOS, more no ops
\ reflect to the east
! jump end program @ if truthy
O output number of TOS
$ skip N at start of program

Fuzzy Octo Guacamole, 8 bytes

42*![o;]

Also could use:

8  ![o;]

Or

81*![o;]

But that is cooler.

Prints 8 "8"s and 8 newlines, including a trailing one.

Explanation:

4: Push 4 to the stack.

2: Push 2 to the stack.

*: Pop and multiply the top 2 items on the stack and push the result (8)

!: Set the loop counter to the top. Is now 8.

[: Start a loop that lasts 'loopcounter' (8) iterations.

o: Peek at the top of the stack and push it to the temp variable.

;: Print the temp var.

]: End the loop.

Python 2, 11 bytes

print`0`*21

This outputs 21 zeroes and a newline.

000000000000000000000


From the Python 2 documentation:

A '\n' character is written at the end, unless the print statement ends with a comma.

Z80 machine code, 16 bytes

3E 1F 0E 02 1E 2A F5 CD 05 00 F1 3D F2 02 01 C7

This was made on an Osborne Executive running CP/M version 3.0 using SID. Here is a disassembly (with comments following # characters for readability)

MVI A,1F     # Set register A equal to 0x1F (iterations-1)
MVI C,2      # Write is BDOS call 2 (CP/M's system calls)
MVI E,2a     # I'm writing '*' as output. Its ASCII value is 0x2a
PUSH PSW     # Push operates on register pairs. This pair contains A.
CALL 5       # Do the BDOS call (which destroys some registers)
POP PSW      # But we can get A back from the stack.
DCR A        # Decrement the loop counter
JP 102       # If last result is non-negative, go to address 0x102
RST 0        # Otherwise, exit

All programs are loaded at a fixed address of 0x100, so the jump to 0x102 is well-defined. After running this, CP/M wants to print a newline character. If we count that as output from the program, change the second byte from 1F to 1E.

Gogh, 3 bytes

6GJ

You can run it like this:

./gogh o '6GJ'

Or without implicit output (4 bytes):

8GJ¡

You can run this using:

./gogh "" "8GJ¡"

The inverted exclamation point outputs the TOS.


Explanation

6    “ Push the integer literal 6 ”
G    “ Push a range (0, TOS]      ”
J    “ Join the TOS               ”

Mathematica, 9 bytes

Echo[16!]

If I am correct, this should output:

>> 20922789888000

with a trailing newline.

Perl 5, 16 bytes - 25 = -9

$_ =$]x($_*2||4)

This is an oddball approach to the problem.

Run with the -p command line argument.

I saw a Perl answer below that used a special variable to print more text - and thus shorten their byte count. So I used a much more verbose special variable. It prints 8 characters with a 2 character variable name. Thus, with a byte count of 16 (padded with one whitespace character to make it 16), it prints 2 * $], where $] is the Perl version printed as 5.xxxxxx, dependent upon your Perl version. Without input it prints it four times, equaling 8*4 or 32, which is double the byte count of the code.

I love Perl.

Mumps, 31 - 25 = 6 bytes

My submission was supposed to be unique (but I hadn't checked all of the answers yet) in that the basic "Assume 2x" code and the bonus-enabled code would work out to be the same length!

Basic code:

F J=1:1:28 W 1

Which is 14 bytes.

Here's the initial bonus-enabled code that takes input, anything that equates to '0' including any non-numeric input assumes 2, then outputs the correct number of output characters. This version is 39 bytes not including the bonus.

R I S:+I=0 I=2 F I=1:1:I F J=1:1:39 W 1

Calculating the bonus 39-25=14 bytes as well!

Too bad (for my narrative) that I looked it over and came up with a shorter version of the bonus code:

R I S:+I=0 I=2 F I=1:1:I*31 W 1

This is only 31 bytes long, so 31-25=6 bytes total, and the header reflects this.

PlatyPar, 1 byte

#

# starts a number, but since no number is found after it, it is substituted with 59. Here's a "real" answer:

77^

Prints the result of 7^7, or 823543, which is of length 6.

Try it online!

Binary-Encoded Golfical, 13+1 (-x flag)=14 bytes

Noncompeting, language postdates the question.

Hexdump:

00 90 01 00 09 17 17 17 17 17 17 17 1D

This encoding can be converted back into the original graphical representation using the included Encoder utility, or run directly by adding the x flag.

Original image:

enter image description here

Magnified 64x, with color labels:

enter image description here

Explanation: Stores 9, prints it seven times (with a newline each time), then turns around and prints it seven more times.

MATLAB, 5 bytes

a=123

Which displays

a =
   123

By my count that is 10 bytes of output if you include the new-line as 1 byte.

Python 2, 11 -1 -6 -11 bytes

'M'*input()*14

Prints 14 * input Ms. Requires a REPL environment.

There may be a way to make it shorter, but at this point I doubt it.

Changes

SWI-Prolog, 3 bytes

nl.

This outputs:

\n
true.

(the \n is printed as an actual linefeed, not the two characters).

Perl, 11 bytes

print"J"x22

Using the lovely x operator, prints 22 Js. I may be able to find a shorter answer.

Note: This answer did not work when the question was asked, so it is not a competitive solution.

Pyth, 6 - 25 = -19 bytes

mb.xE2

Demonstration

First, we attempt to take STDIN input and evaluate it. It this throws an error, we use 2 instead. Then, we make a list of that many newline characters. Newline characters take 4 characters to represent ('\n') and there are 2 bytes of list overhead ([] or ,) per element, so it comes out to exactly 6 times longer than the above number.

Sass, 30 bytes

codegolf is absolutely awesome

if you try to compile this with sass the result is the following error

Invalid CSS after "...olutely awesome": expected "{", was "" 
/* 60 bytes */

Mouse-2002, 32 - 25 = 7 bytes

A quine is not possible in Mouse, unfortunately, else I would have gone that way.

?&DUP 0=[1]32*y:(y.x.>^1!x.1+x:)

Explained:

? &DUP        ~ get some input; dup it
0 =           ~ if 0
[             ~ then
  2           ~ push 2 instead
]             ~ fi
32 * y:       ~ push 32* and assign into y
(             ~ while(true)
  y. x. > ^   ~ cmp
  1 !         ~ print a 1
  x. 1 + x:   ~ increment x
)             ~ endwhile
$             ~ (implicit) end prog

Perl 6, 3 points

say 'a'x 21 # 11
# say adds a newline
print 'a'x 28*(@*ARGS[0]//2)
# 28 - 25 = 3

Python, 15 bytes

print 'aaaaa'*6

Prints:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

Which is 30 bytes.

JavaScript (ES5), 68 bytes - 25 bonus = 43

alert(Array(1+(+prompt()||2)).join(document.scripts[0].textContent))

(in case your browser won't allow for the snippet to run for security reasons, try this fiddle http://jsfiddle.net/thePivottt/c3v20c9g/ )

This script only works in a browser following at least DOM3 (with Node.textContent) and ECMAScript 5 (or perhaps an older version). I tried to make is as standard conforming and compatible as possible. It also assumes that the script is in the first script element of the document.

It actually concatenates multiple copies of the script itself, which is pretty awesome. Note that the snippet tool on SE puts extra whitespace around the script. We could ignore that whitespace with .trim() but I don't find it necessary considering the program is perfect without SE's meddling. Just save this HTML5 file if you want to see it run perfectly.

<!DOCTYPE html>
<html>
  <head>
    <title>Minimalist HTML5 page</title>
    <script>alert(Array(1+(+prompt()||2)).join(document.scripts[0].textContent))</script>
  </head>
</html>

This script uses prompt and alert because console.log is not part of any standard, even if most modern browsers use it. If the number of repetitions passed is not a valid number or is empty, it defaults to 2. If the input is a decimal number, the program crashes due the the invalid array length.

The code uses a few interesting features of JavaScript:

CJam, -17 bytes

r2e|i8,*

The source code is 8 bytes long and qualifies for the -25 bytes bonus.

Try it online in the CJam interpreter.

How it works

r         e# Read a token from STDIN.
 2        e# Push 2.
  e|      e# Logical OR; keep the token if it's not empty, 2 otherwise.
    i     e# Cast to integer.
     8,   e# Push [0 1 2 3 4 5 6 7].
       *  e# Repeat the array the corresponding number of times.

Common Lisp REPL, 9

(write -)

- is a variable that holds the currently evaluating expression in the REPL, while write returns whatever it writes. So it writes (write -) then returns "(write -)" which is printed by the REPL without the quotes. (If this was done in an REL instead of an REPL, then it'd be a quine instead.)

Minkolang 0.9, 11-25 = -14 bytes

This language was created after this challenge, but not for it.

nd1+?2["d].

Try it here.

Explanation

This takes an integer from input, pushing a 2 on the stack if it's -1 (i.e., the input is empty). Then I use the clever quine trick: the " pushes the whole program (except the ") onto the stack. To make up for the ", I duplicate the top of stack with d. This is printed out n or 2 times and then the program stops. In the case where there is no input, there is indeed a -1 on the stack. However, Minkolang outputs nothing for negative numbers, so it does not add anything.

Vitsy, 14 11 - 25 = -14 Bytes

Note: This language was made after this question was asked, but it was not created for this task.

2a{b*\[DO];

I'm pretty sure this can be golfed down a little more, but here you go:

2a{b*\[DO];
2              Push 2 to the stack as the backup value - if input is pushed, then it will already exist in the stack.
 a             Push "\n" (the literal) to the stack as an integer - this will be our output.
  {            Rotate the stack to the left
   b*          Multiply the top value (used to be the back-most (2 or input) value) by 11.
     \[..]     Repeat as many times as the top item of the stack specifies for all instructions within []
       DO      Duplicate the top value, then output it.
          ;    End execution.

Burlesque - 7 Bytes

blsq ) '*14.*Q
**************

It just prints 14 asteriks, while the length of the program is 7 bytes. As for the bonus:

ri12.*'*j.*Q

is 12 bytes long and prints 12*n (number provided on STDIN) asteriks.

Simplex v.0.5, 22 - 25 = -3 bytes

i?[{u(' R)22vM}ug#]2O3
i                      ~~ take input as number
 ?[               ]    ~~ do inside if byte is nonzero
   {          }        ~~ loop inside until zero byte met
    u       v          ~~ up/down strip traversal
     (   )22           ~~ repeats the inner 22 times
      '@R              ~~ pushes an @ and goes right
               ug      ~~ goes to the string strip and clears the strip
                 #     ~~ cease!
                   2   ~~ sets the current byte to two (default N)
                    O3 ~~ goes to the third byte in the source code

Essentially, for each pass of an integer N (input), the string @@@@@@@@@@@@@@@@@@@@@@ is printed once, i.e., N*"@@@@@@@@@@@@@@@@@@@@@@". Since the (...) is a preproccesed command, variable inputs cannot be handled. If they could, then I might shorten the code to something like ('@R)ig whilst handling the special cases. Wouldn't that be something?

Hassium, 55 Bytes

use Math;func main(){ for(x=0;x<7;x++)print(Math.pi); }

Output:

3.141592653589793.141592653589793.141592653589793.141592653589793.141592653589793.141592653589793.14159265358979

Run and see online here

[this is a sticky note] This answer has multiple versions.

Due to the fact that I honestly am not quite sure what "input" means here. The first is the one I would use to score myself. Go down to the second to find an explanation. For scoring 1 point, do I tie with the Matmematica one? Or for scoring -1 (-5?) points, do I win? Hmm.

Anywho, this was quite a fun challenge. Maybe I can make my answer a bit better but anyways.

Python 2.7, 26 - 25 = 1

If input means input from stdin:

print("|"*26*input())[:-1]

Python 2.7, 24 - 25 = -1

If input means a variable:

n=2;print("|"*24*n)[:-1]

Wuut?

n=2                   # Set a variable n to 2
;                     # Separate statements (like a line break)
print                 # Print..
(                     # This is in 2.7, not 3, where print is a
                       # statement, not function
  "|"                 # Any character works here
  *24                 # Multiply said character by 24
  *n                  # Multiply resulting string by n
)
[:-1]                 # Remove one character due to the line break
                       # automatically created by print.

Python 2.7, 20 - 25 = -5.

If input means a variable, and you don't count n=2; as part of the program:

Simply change 24 to 20:

print("|"*20*n)[:-1]

Go, 59 Bytes

package main
import"fmt"
func main(){fmt.Printf("%118d",0)}

Prints 0 formatted with padding

Here is a version with argument (145-25 Bytes):

package main
import("os"
"fmt")
func main(){i:=2
if len(os.Args)>1{fmt.Sscanf(os.Args[1],"%d",&i)}
fmt.Printf("%"+fmt.Sprintf("%d",i*145)+"d",i)}

APL, -8 bytes

'*'⍴⍨17×{0::2⋄⎕}⍬

Explanation:

Pyth, 4 bytes

*8"1

will print out

11111111

CJam, 1 byte

A

Prints 10. Very straightforward.

Javascript, 3 bytes!

1e5

Returns 100000. Y'all JS golfers are overthinking it!

R, 3 2 bytes

Code

!0           # NOT FALSE

Outputs

TRUE

Wow, finally R, finally.

It seems that {} work too, it outputs NULL

Bonus 33 16 bytes:

Code

rep(1,number*16)

Outputs

# if number is not defined
> rep(1,number*16)                     
> Error: object 'number' not found     # output is 32 (or 2*16) bytes long error

# if number is defined
> number = 3                            
> rep(1,number*16)                     # output is 16*number bytes long
> 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

JavaScript, 2 bytes!

Even shorter than the 3 bytes solution:

!0

Returns true after running.

Retina, 25 24 - 25 = -1 bytes

^$
11
1
11111111!
&!`111

Use the -s flag to run the code from a single file. Input is in unary.

For reference, without the bonus, there's a 1-byte solution:

!

Really any single character would do, so long as it's a valid regex (so an unmatched parenthesis wouldn't). This will just print the number of matches (zero in this case) followed by a newline, which makes two bytes.

Explanation

A translation of the sed answer, requires 25 bytes (computed as 5x5) instead of 40 (see revision history). However, we can do better in Retina:

First, we default the input to (unary) 2 if it's empty with:

^$
11

Now we turn each 1 into eight 1s and an exclamation mark with:

1
11111111!

What we ultimately want is to print 24 bytes for each of those chunks. The idea is to get a "free" multiplication by using Match mode's options to a) print all matches and b) consider overlapping matches. We also note that each match is terminated by a linefeed. So if each match is 3 bytes, we'll get 4 bytes per line, and need 6 lines. How many possible 3-byte matches are there in a string of 8 ones?

11111111
111
 111
  111
   111
    111
     111

Six. How convenient :). So we the final stage is simply:

&!`111

Which means that for each unit of source code length requested, we print:

111
111
111
111
111
111

with a trailing newline, which is exactly 24 bytes.

Note that this is why we needed to append the exclamation mark to each line: it ensures that we don't get additional matches which are shared between chunks.

POSIX bc, 4 bytes

10^7

This creates the output 10000000.

C#, 77 bytes

102 bytes - 25 bonus

class c{static void Main(string[]a)=>System.Console.Write(new string('x',102*int.Parse(a[0]??"2")));}

Creates a string of the specified length, defaulting to 2.

Funciton, 78 bytes

Not very advanced. Just output 156 As. Of course you can change 65 to any two-digit ASCII code. If non-printable characters are allowed as well, you could shorten it by 6 bytes by outputting character #1 144 times.

╔═══╗┌─╖╔══╗
║156╟┤…╟╢65║
╚═══╝╘╤╝╚══╝

Python 2.7, 26 24 - 25 = -1 byte

def s(c=2):print'A'*24*c

24 characters long, prints twice its length on no input:

>>> s()
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

prints n*length for any other input:

>>> s(1)
AAAAAAAAAAAAAAAAAAAAAAAA
>>> s(3)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

T-SQL, 16 bytes

SELECT SPACE(32)

This returns a string of 32 spaces. Can't think of anything fancier at the minute.

Python 3, 30 - 25 = 5

print(int(input()or 2)*30*"X")

It expects input on standard input, an empty input is treated the same as 2.

If we can use the REPL, rather than running as a script, you can remove the print call, to save 7 bytes and bring our score down to -2:

>>> int(input()or 2)*21*"X"
1
'XXXXXXXXXXXXXXXXXXXXX'

(Note that we multiply by 21, rather than 23 because of the quotation marks that appear in the string's repr.)

A Python 2 version of the same code can be written for three extra bytes (we need to add raw_ to the input, but can replace the pair of parentheses around print's arguments with a single space):

print int(raw_input()or 2)*33*"X"

Python 2, 11 bytes

print 9**21

displays 109418989131512359209\n (22 chars)

Bubblegum, 1 byte

Ä

prints

!#

Test run

$ echo -en '\xc4' > double.bg
$ bubblegum double.bg 
!#

Bash + GNU coreutils, 26 24 - 25 = 1 -1 byte

The x file:

yes|head -c$[24*${1:-2}]

(no trailing newline)

Running:

$ bash x 1 | wc -c
24
$ bash x | wc -c
48
$ bash x 3 | wc -c
72

Old version with 26 bytes:

The x file:

yes|head -c$((26*${1:-2}))

(no trailing newline)

Bash + GNU coreutils, -1 byte

printf %24s `seq ${1-2}`

Score is 24-25

A non-bonus version for +5:

seq 5

which produces 1 nl 2 nl 3 nl 4 nl 5 nl.

Sed, 40 - bonus = 15

s/^$/11/
s/.*/&&&&&/
s//&&&&&&&&/
s/.//

There's no final newline. Input is in unary, as you'd expect for sed.

We begin by defaulting the input to two. Then we multiply it by 5 and then by 8 for a total multiplication of 40. Our output includes a newline, so we must subtract one before it's printed.

Test results

$ for i in '' 1 11 111 1111; do sed -e 's/^$/11/;s/.*/&&&&&/;s//&&&&&&&&/;s/.//' <<<"$i" | wc -c; done
80
40
80
120
160

DOS, 7 bytes

date /t

outputs di 06-10-2015 (and a newline) on my system, but I'll admit it's locale dependent. So my second best is:

echo %PATH:~0,33%

which outputs C:\WINDOWS\system32;C:\WINDOWS;C: (and a newline).

Seed, 10 bytes

4 56111240

This compiles to the Befunge program (found by brute force)

9k.@

which produces the following 20 bytes when run (tested in CCBI, note the trailing space):

0 0 0 0 0 0 0 0 0 0 

Being unfamiliar with Befunge 98, I had to double check the spec a few times for this one:

><>, 19 + 2 (-v flag) - 25 = -4 bytes

l?!2f4+*v
-1o;!?::<

test it here!

Thanks Cole and Sp3000

First checks the stack length, if it's 0 put 2 on the stack. Multiplies it by 21 (code length), then outputs the unicode representation of that number and decrements it by 1, loops until 0. (you'll have to inspect the output to see the characters, since the browser won't display them)

Self-modifying Brainfuck, 31 - 25 = 6 bytes

Checking for no input is a hassle...

>,>+<[>-]>[<++>->]<<[<<[.<]>>-]

Explanation:

See the If(x==0) algorithm I used (the one by Ben-Arba).

>,                      Take a byte of input x
>+<[>-]>[<++>->]<<      If x == 0 (no input), x++ (add 2 :D)
[<<[.<]>>-]             Print the program's source code in reverse x times

Without the bonus (10 bytes):

<[.<]>[.>]

Wishful thinking:

If we didn't have to default the input to two (13 - 25 = -12 bytes):

>,[<<[.<]>>-]

Shakespeare, 768

Yeah, Shakespeare's not much of a golfing language. Outputs 1,536 spaces.

Rosencrantz and Guildenstern: A Series of Tedious Events.

Rosencrantz, a count of extraordinary determination.
Guildenstern, a spacy character.

Act I: The Long Conversation

Scene I: A Tortured Friendship

[Enter Rosencrantz and Guildenstern]

Rosencrantz:
 You are a gentle, noble, valiant, loyal, loving companion.

Guildenstern:
 You are nothing!

Scene II: Asking the Hard Questions

Rosencrantz:
 Speak your mind.

Guildenstern:
 You are as fair as the sum of yourself and a daisy. Are you as
 daring as the sum of a big, bold, fiery, feisty, rough, rowdy,
 ham-fisted, hawk-eyed, broad-shouldered, bright-eyed lad and a
 large, yellow, vicious, hairy, wild, scary, long-tailed,
 sharp-clawed, small-eared lion?

Rosencrantz:
 If not, let us return to scene II.

Edit: 256

Okay, I'll actually golf it. Note that the above does not compile in any existing Shakespeare implementation because I wrote it painstakingly by hand (but am prepared to defend its correctness.)

The below translates to C with one warning in spl-1.2.1, and outputs 512 spaces:

Ummm.Ajax,1.Puck,2.Act I:I.Scene I:A.[Enter Ajax and Puck]Ajax:You old old old old old cow.Puck:You are zero!Scene II:B.Ajax:Speak thy mind.Puck:You are the sum of you and a red cat.Are you as big as the square of me?Ajax:If not, let us return to scene II.

C, 82 bytes (with bonus)

main(int a,char**b){b&&b[1]&&(a=atoi(b[1])-1);a&&main(a-1,0),printf("%.80f",.0);}

Usage:

$ wc main.c
       1       2      82
$ ./a.out | wc
       0       1     164
$ ./a.out 4 | wc
       0       1     138
$ ./a.out 133475 | wc
       0       1 10944950

MUMPS, 4 bytes

w ?8

Well, I'm not sure if this really counts. What this program does is advance the output cursor 8 characters to the right. On every terminal I've used, this is indistinguishable from outputting 8 spaces, but is it really the same thing? I dunno.

Powershell, -10

"a"*15*$args[0]

Powershell, 2

This answer without the bonus is probably golfier though

$?

Outputs;

True

Brainfuck, 14 bytes

+++++++[....-]

This is a little mathematical exercise. Let's denote the number of + characters in the code by a, and the number of . characters by b.

The code outputs a*b bytes, with values from a down to 1 (these are non-ASCII bytes, but it seems OK according to the spec). The code's length is a+b+3. So we have

a*b = 2 * (a+b+3)

Trying different values for a and b, we see that the minimum for a+b+3 is achieved for

a = 4       or       a = 7
b = 7                b = 4

Insomnia, 1

7

Output:

00

8, A, B are 3 other programs that satisfy the requirement. Their output contains NUL characters, though.

Julia, 9

warn(⊆)

prints

"WARNING: issubset\n"

QBasic, 2 bytes

?1

Nonnegative numbers in QBasic are output with both a leading and a trailing space. The PRINT command (for which ? is a shortcut) outputs a newline by default. Thus, I count 4 bytes of output: space 1 space newline.

R, 3 bytes

10;

will print

[1] 10

C, 23 (without bonus)

main(){printf("%46d");}

Outputs an uninitialized value, padded by spaces to 46 bytes. Trying to do it with a bonus, I arrived to a tie. I don't know whether it's unfortunate or cool.

C, 23 (with bonus)

main(x){printf("%*d",(~scanf("%d",&x)?x:2)*48);}

The code has 48 bytes. I use bit-complement ~ to check whether scanf returned -1.

Brainfuck, 25 bytes

Prints 50 characters, most of which are control characters.

+++++++[>+++++++<-]>+[.-]

TI-BASIC, 1 byte

0

Output:

0    ;there is a newline; counts as char

Thanks to Thomas Kwa for his spectacular observation. The i/o looks as thus:

0
               0   ;right-aligned, but newline is part of output.

GolfScript, 11 - 25 = -14 bytes

~2]0=11*(n*

Given n, outputs n times as many newlines as the length of the code in bytes (= 11). Given no (i.e. empty) input, outputs 22 newlines.

The implementation is very straightforward:

JavaScript (ES6), 24 30 - 25 = 5 bytes

alert('s'.repeat(30*prompt()))

Ruby, 5 bytes

p 1e6

Outputs 1000000.0 and a newline, which is 10 bytes in summary

Haskell, 19 bytes

main=print[92..102]

Outputs: [92,93,94,95,96,97,98,99,100,101,102] and a NL.

><>, (15 + 3) - 25 = -7

2}f*:?!;1n1-30.

Like torcado's answer, but a one-liner. Takes input via the -v flag, e.g.

py -3 fish.py double.fish -v 5

and outputs 15*<input> ones.

><>, 5 bytes

"nn#;

Here's a version without any bonuses. Outputs 5935110110.

GolfScript, 1 byte

1

At the end of a GolfScript program, the interpreter outputs everything that's on the stack, and a trailing newline. So the output of the above program is 1 with a trailing newline, two bytes.

MSM, 12 bytes

'...;.;.;...

Outputs ........................

C, 25

main(){printf("%*p",50);}

This makes use of UB, but it should work. At least it works with gcc 5.2.0

Ruby, 22 bytes - 25 bytes = -3 bytes

c=->n=2{p ?d*21*n}
c[]

The reason the value shows up as 21 bytes in the code itself is that the quotation marks are printed, effectively reducing the number of bytes I need to print by 2 (left paren and right paren).

C#, 63 62 bytes

class P{static void Main(){System.Console.Write($"{1,124}");}}

Will print 123 spaces followed by 1.

Pyth, 8 - 25 = -17 bytes

mU2?zvz2

Demonstration

Note: This only works in the online compiler, because it removes the trailng newline.

Output form:

[[0, 1], [0, 1], [0, 1]]

Element, 16 bytes - 25 bonus = -9

_2:1<[2]16*'[X`]

Explanation:

_2:1<[2]16*'[X`]
_                  take input
 2:                duplicate it
   1<              test "if less than one" (like an empty input)
     [2]           FOR/IF push 2 if true
        16*        multiply by 16
           '       move result to control stack
            [  ]   FOR
             X`    output the letter X

Element, 6 bytes

9 12^`

prints 282429536481

Explanation:

9       push 9
  12^   to the twelfth power
     `  output

PHP 7, 9 Bytes

<?=str_repeat(1,($argv[1]??2)*34);

Uses the short opening tag with echo <?= and the null coalesce operator ?? which falls back to 2 if $argv[1] is not set, without throwing an error.

TI-Basic, 3 bytes

1ᴇ5

Prints 100000.

Pyth, 6 bytes

*4"aaa

Explanation:

*4"aaa
-------+------------
  "aaa | Print "aaa"
*4     | 4 times

Pyth, -7 bytes

*.xvw2*2"aaaaaaaaa

Plain and simple.

*.xvw2*2"aaaaaaaaa
-------------------+----------------------
      *2"aaaaaaaaa | Print twice the "a"s
*                  | times
 .xvw              | try to evaluate input
     2             | otherwise, 2

dc, 10 - 25 = -15

2?A*Ar^1-n

Takes a blank line for "no input".

Calculates 10 ^ (10 * n) - 1, where n is the input, or 2 if input is empty. Prints a string of 9s of the required length.

Stuck, -13 Bytes

i_0>;2?12*N*

This prints a bunch of newlines (N). Empty input is considered to be 0 (or anything less than 0). So, if 4 was given, it will print 48 newlines.

Old Answer - 3 Bytes

6Rj

will output

123456

Will be giving the bonus a shot.

CJam, -9

q_,{i}{;2}?G*'X*

Explanation

Reads the entire input and pushes it, then pushes the length.

If the length of the input is over zero, convert it to an integer. Otherwise, pop the input and push 2.

Pushes 16 (the program length), then multiplies it by 2 if there is no input, or by the input.

Pushes X and multiplies it by the top of the stack.

Python 3.4, 14 13 bytes

print("a"*26)

JavaScript (ES6), 50-25=25

a=prompt();alert("0".repeat(48*(isNaN(a|0)?2:+a)))

gs2, -18 bytes

CP437: W↕0!↨.2

Hex dump: 57 12 30 21 17 2e 32

W reads numbers from STDIN into a list. ↕0 appends a 2 to the list, and ! extracts the first element. Then ↨. (the list [0,1,2,3,4,5,6]) is repeated (2) this many times.

This is very similar to Dennis's CJam answer -- gs2 just combines r and i into one byte.

Note: I had to fix a bug in the gs2 implementation for this to work: previously, each program had a hidden newline appended to its output, which was entirely unintentional. It only surfaced after I tried to solve this program (the language was designed for anarchy golf, which ignores trailing newlines in all problems), and I only pushed a fix to master just now, so feel free to take this answer with a grain of salt.

JavaScript (ES6), 23 bytes - 25 = -2

(n=2)=>'x'.repeat(23*n)

Just for fun here's a quine version with a score of 27 bytes -25 =2

a=(n=2)=>`a=${a}`.repeat(n)

Perl, 10 9 bytes

Uses @primo's suggestion of $=.

print$=x9

$= is a shortcut for $FORMAT_LINES_PER_PAGE, which defaults to 60.

Example:

$ cat doubler.pl
print$=x9
$ perl doubler.pl
606060606060606060

Perl, 18 - 25 = -7

print$=x(<>*9||18)

The special variable $=, a.k.a. $FORMAT_LINES_PER_PAGE, begins its life as 60, and therefore only needs to be duplicated half as many times as byte output needed.

Befunge-98, 26-25=1

&:#v_v>1.1-v
*d2<2<^_@#:<*

Run it in this interpreter. Apparently, it can't take input.

Befunge-93, 30 - 25 = 5 27-25=2

&:#v_v>1.1-v 
*93<2<^_@#:<*

There is a trailing space on the first line, and this is done because it's shorter to make 27 than it is to make 26 with Befunge-93. This outputs 27*n 1s in a row.

awk, 29 - 25 = 4 bytes

{printf"%0"($0?$0:2)*29"d",0}

Prints the wanted number of zeros.

C#, 104 bytes (79 point with bonus)

class a{static void Main(string[] p){System.Console.Write(new System.String('1',104*int.Parse(p[0])));}}

you can run the program by using an argument for example test.exe 2 prints 208 character '1'

q, 10 3 bytes

3#0

Outputs 6 bytes: "0 0 0\n".

q (bonus), 27 bytes

1#[;"x"]27*2^first"J"$.z.x;

HQ9+, 2 bytes

QQ

outputs

QQQQ

I think it is not forbidden here.

C++, 80 bytes

#include<iostream>
int main(){int i=0;while(i<20){std::cout<<&i;i++;}return 0;}

note the newline character is two characters. (if you don't want it to be, change i<20 to i<=19 to get back to the same byte count.)

Sample output (will change every time)

0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C0088FA0C

same 8 character memory address 20 times.

Macaroni 0.0.2, 23 chars

print tobase pow 32 9 2

Prints 329 in binary, which happens to conveniently turn out to be 46 characters long (it's 1000000000000000000000000000000000000000000000), without a trailing newline.

Microscript, 1

0

Prints the digit 0, followed by a newline.

Python 2.6, 10

print`-.1`

Prints -0.10000000000000001, which is 20 chars.

Note that the string repr shows more precision. print-.1 just gives -.1, and print.1/3 gives 0.0333333333333 for only 13 digits of accuracy.

Python 2, 11

print`id`*1

Print the string representation of the built-in id, which is 22 chars:

<built-in function id>

The *1 is to get the code to 11 chars. You could also do print id;00.

More boring alternative 11's are:

print'1'*22
print 9**21

dc, 19 - 25 = -6

2?19*[1n1-d0<l]dslx

Takes a number (2 is pushed to the stack as backup) and multiplies it by 19. Prints a 1 (no newline) and decrements the number. Loops while the number is greater than 0.

Ruby, 24 - 25 = -1

$><<?x*24*(gets||2).to_i

><>, 29 + 2 (-v flag) - 25 = 6

l0=?21-:0(?;fe+1-ao:0=f*e+0.~

Takes input on the stack, which I believe is populated through -v on the official interpreter. Prints newlines only.

Mouse, 21 bytes

1I:(I.43<^9!1I.+I:)$

Ungolfed:

1 I:                  ~ Begin a loop index at 1
( I. 43 < ^           ~ While I < 43...
  9 !                 ~ Print 9 to STDOUT
  1 I. + I:           ~ Increment I
)$

Julia, 42 bytes - 25 = 17

print("@"^42((r=readline())>""?int(r):2))

This reads a line from STDIN using readline(). If it's empty, i.e. no input has been provided, then n is defined to be the input converted to an integer. Otherwise n is 2. We then print 42​n @s to STDOUT.

Ruby, 6 bytes

p ?a*9

Prints "aaaaaaaaa" (including the quotes) and a newline.