g | x | w | all
Bytes Lang Time Link
011Uiua240810T090842ZJoonas
037Setanta240810T045950Zbb94
035JavaScript Node.js240808T215518ZAndrew B
023YASEPL240209T231320Zmadeforl
009Uiua SBCS240208T122616Zchunes
021Labyrinth240208T095218ZBubbler
094TypeScript’s type system240117T212229Znoodle p
015Uiua240117T171948ZJoao-3
003Vyxal 3240114T191936Zpacman25
050JavaScript230201T171039ZEzioMerc
057F# .NET Core230201T024415Zdtanku
nan230201T150829ZThe Thon
006Pyt230201T000848ZKip the
028><>221201T142913ZEmigna
009GolfScript221130T234753Zemirps
021Knight v2.0alpha220918T064957ZSampersa
nanFig220908T185000ZSeggan
nanFig220908T135056Zlyxal
054Deadfish~220908T235934ZnaffetS
022Julia220909T150604Zamelies
2421Julia220908T182628ZCzylabso
041yup220909T081817ZKevin Cr
048Nibbles220909T080900ZDominic
031Headass220908T202239Zthejonym
043Prolog SWI220909T000133ZnaffetS
015Regenerate a220908T201247ZDLosc
015Regenerate220908T170818ZDLosc
005Husk220908T133358ZCalga
021Desmos220309T001530ZAiden Ch
175Malbolge220308T233557Zapollyon
024Excel211214T172040ZEngineer
027Pure Zsh220101T071510Zpxeger
021Haskell200317T175410Zxnor
013Add++ i220101T051823Zlyxal
005Pip211231T235307ZDLosc
021APOL211221T201622ZGinger
017Wolfram Language Mathematica200317T104500ZZaMoC
037Lua211219T031048ZVisckmar
017TIBasic211218T190350ZYouserna
046A0A0210612T130812Zstefvans
003Vyxal j210612T113813Zemanresu
029Factor210612T114949Zchunes
050JavaScript210224T095918Zuser1006
194Deadfish~210224T091911Zemanresu
3237AWK210104T155500ZPedro Ma
026Scala210103T203208ZMichael
006Canvas210103T063100Zhakr14
019jq nr200317T100506Zmanatwor
007mlochbaum/BQN201010T093058ZRazetime
056Rust201008T191756Zouflak
007Husk201009T053948ZRazetime
222Poetic201009T012008ZJosiahRy
050brainfuck201009T005937ZDaniel C
059Java 11 JDK200317T143352Zgreinet
1816x8616 machine code200624T135230Z640KB
034Python 3200625T131523Zuser9594
451Brainetry200624T151949ZRGS
021International Phonetic Esoteric Language200623T171436Zbigyihsu
032Clojure200622T180800ZNikoNyrh
020MAWP 0.1200622T092504ZDion
045C# Visual C# Interactive Compiler200622T100225ZJirka Pi
075COW200526T151247ZDomenico
006cQuents200526T094640ZPkmnQ
047C gcc200422T083840Zl4m2
028Fortran GFortran200322T125016ZDingus
050Common Lisp200506T081853ZElcan
038Python 3200403T203725ZDion
046C gcc200317T164223Zdingledo
005MathGolf200319T085826ZKevin Cr
037Pure Bash200317T072930ZMitchell
022dc200422T062355ZMitchell
126vJASS200417T014829Zネルマン
065C++ gcc200418T021152ZStealing
048Javascript200417T232812ZMatthew
058[VBA]200403T215231ZMarx
008Gol><>200328T164519ZGegell
018J200317T081213ZGalen Iv
109Whitespace200319T154943ZKevin Cr
085Batch200321T052133ZT3RR0R
025Bash + Core utilities200317T074740ZMitchell
004Japt P200317T125631ZShaggy
039Factor200318T075503ZGalen Iv
047SNOBOL4 CSNOBOL4200318T131052ZGiuseppe
004APL Dyalog Unicode200318T052418ZAviFS
005Stax200318T101914ZKevin Cr
nanPHP200317T111742ZGuillerm
056IBM/Lotus Notes Formula Language200318T091914ZElPedro
nanThis is my dumbest code golf submission ever200318T091120Ztia
030Red200318T071137ZGalen Iv
030Zsh200318T061939ZGammaFun
082BrainFlak200317T165730ZWheat Wi
025Ruby200317T231007ZLevel Ri
036naz200318T005237Zsporebal
015R200317T233725ZGiuseppe
074Batch200317T203545ZNeil
004Japt200317T184257ZGymhgy
029Haskell200317T135340Zovs
032Python 2200317T135024ZElPedro
050C gcc200317T131741ZS.S. Ann
049Erlang escript200317T130129Zuser9206
035Google Sheets200317T123417ZEngineer
033JavaScript ES8200317T081524ZArnauld
003W200317T112518Zuser9206
013Perl 6200317T115721ZJo King
023Bubblegum200317T105815Zovs
012Retina200317T105527ZNeil
053C gcc200317T105509ZNoodle9
005Charcoal200317T104845ZNeil
034Python 3.8200317T104119ZGáb
005Jelly200317T095641ZNick Ken
038Io200317T094728Zuser9206
056brainfuck200317T091140ZDorian
069TSQL200317T084720Zt-clause
00305AB1E200317T085818ZDorian
018Perl 5200317T084150Zandytech
018R200317T081844ZRobin Ry
030Kotlin200317T075149Zsnail_
027Icon200317T074712ZGalen Iv
015PowerShell200317T073312Zmazzy
008Keg200317T071207Zlyxal
028Python 2200317T072402ZChas Bro
006APL dzaima/APL200317T072132ZAdá
007APL Dyalog Unicode200317T072035ZBubbler

Uiua, 11 bytes, 6 characters

▽.+1⇡9

Output: [1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 7 7 7 7 7 7 7 8 8 8 8 8 8 8 8 9 9 9 9 9 9 9 9 9]

Try it on Uiua Pad!

Setanta, 37 bytes

le i idir(1,10)scriobh(go_teacs(i)*i)

try-setanta.ie link

JavaScript (Node.js), 35 bytes

f=(x=9)=>x?f(x-1)+''.padEnd(x,x):''

Try it online!

YASEPL, 24 23 bytes

=a$`1=b)""+a;b,a<!+}4,9

explanation (in pseudocode)

=a$`1=b)""+a;b,a<!+}4,9          packed
=a$                              a = 1
   `1            !+}4,9          for(i = 0; i < 9; i++)
     =b)""+a;b,a<                  print(str(a).repeat(a))                 

Uiua SBCS, 9 bytes

▽:+@0.⇡10

Try it!

Labyrinth, 21 bytes

" }*!@
9 : {
:(1""
""

Try it online!

Intro
9    Push 9

Loop 1
:(""    Duplicate and decrement; exit when top is 0

[9 8 7 6 5 4 3 2 1 0]
Loop 2
1:}     Use the 0 as the basis for repunit;
        append 1, copy to aux.stack  [... i "1"*i | "1"*i]
*!      Multiply i and "1"*i and print; exit when the stack is empty
{       Pull the repunit back  [... i+1 "1"*i]

@       Halt

Labyrinth, 21 bytes

1:#
: (*
;  !
%9_:@
"

Try it online!

Loop: [... "1"*i] -> [... "1"*i "1"*(i+1)]
1     Append 1 (multiply by 10 and add 1)
:     Dup
#(    Stack size - 1 (== i+1)
*!    Multiply and print
:_9%  Test if the current repunit % 9 is 0 and exit loop if so
;:    Discard the test value and dup to increase the stack size by 1

9_:@  Halt

TypeScript’s type system, 94 bytes

type F<N extends 1[]=[1],L=N["length"]>=L extends 10?[]:[...{[_ in keyof N]:L},...F<[...N,1]>]

Try it at the TS Playground

Uiua, 15 bytes

∵(⋕/⊂∵°⋕↯).+1⇡9

Pad

Vyxal 3, 3 bytes

9ƛY

Try it Online!

Edit, the three byter is valid

JavaScript, 50 bytes

_=>'122333444455555666666777777788888888999999999' // 50
_=>eval("for(s='',i=0;i<11;s+=''.padEnd(++i,i))s") // 50
n=>eval("for(s='';(n=-~n)<11;s+=''.padEnd(n,n))s") // 50
_=>'123456789'.replace(/(\d)/g,(d,i)=>d.repeat(i)) // 50

Try it:

f1=_=>'122333444455555666666777777788888888999999999' // 50
f2=_=>eval("for(s='',i=0;i<10;s+=''.padEnd(++i,i))s") // 50
f3=n=>eval("for(s='';(n=-~n)<11;s+=''.padEnd(n,n))s") // 50
f4=_=>'123456789'.replace(/(\d)/g,(d,i)=>d.repeat(i)) // 50

console.log(f1());
console.log(f2());
console.log(f3());
console.log(f4());

F# (.NET Core), 59 58 57 bytes (thanks ouflak!)

for i=1 to 9 do String.replicate i (string i)|>printf"%s"

or

for i=1 to 9 do printf"%s"(String.replicate i (string i))

Try it online!

Thunno N, \$ 8 \log_{256}(96) \approx \$ 6.58 bytes

9R1+eDJ*

Attempt This Online!

Explanation

9R        # Push range(0, 9)
  1+      # Add one to each
    e     # To each number:
     D    #  Duplicate
      J   #  Cast to string
       *  #  Repeat that many times
          # N flag joins by newlines
          # Implicit output

Pyt, 6 bytes

ɳąĐƖ*ǰ

Try it online!

ɳ           pushes string containing all digits ("0123456789")
 ą          converts to ąrray of characters
  Đ         Đuplicates on stack
   Ɩ        casts top of stack to array of Ɩntegers
    *       string multiplication
     ǰ      ǰoin with no delimiter; implicit print

><>, 28 bytes

1:\   >~1+:a=?;!
n$>:?!v1-$:

Try it online!

GolfScript, 9 bytes

10,{.`*}/

Explanation

     /  # for each element in...
     10,{ # 0-9
     . # duplicate it
     ` # stringify it
     * # push to the stack the stringified version of the number, repeated that many times
    }  # end block
       # implicitly output the stack

Try it online!

Knight (v2.0-alpha), 21 bytes

;=i@W>10=i+1iO*+""i i

Try it online!

Fig, \$6\log_{256}(96)\approx\$ 4.939 bytes

Mcd'*_

Try it online!

Lyxal tried to outgolf me in my own language again.

Mcd'*_ # Full program
 cd    # Digits
M  '   # Map each digit string
    *  # Repeat the digit
     _ # By the number form of it

Fig, \$7\log_{256}(96)\approx\$ 5.762 bytes

Ma9'*+D

Try it online!

Explained

Ma9'*+D
Ma9'    # To each item n in the range [1, 9]
    *+D # Repeat the stringified n, n times

Deadfish~, 61 54 bytes

ioiooioooiooooioooooiooooooioooooooiooooooooiooooooooo

Try it online!

-7 bytes thanks to Bubbler.

Separating by zeros:

Deadfish~, 128 bytes

{iiiii}dcdciiccddciiicccdddciiiiccccddddciiiiicccccdddddciiiiiiccccccddddddc{i}dddccccccc{d}iiic{i}ddcccccccc{d}iic{i}dccccccccc

Try it online!

By spaces:

Deadfish~, 159 bytes

{iiiii}dc{dd}iiic{ii}ddcc{dd}iic{ii}dccc{dd}ic{ii}cccc{dd}c{ii}iccccc{dd}dc{ii}iicccccc{dd}ddc{ii}iiiccccccc{dd}dddc{ii}iiiicccccccc{dd}ddddc{ii}iiiiiccccccccc

Try it online!

Julia, 22 bytes

1:9 .|>i->show("$i"^i)

Attempt This Online!

prints

"1""22""333""4444""55555""666666""7777777""88888888""999999999"

Relying on the repl for printing output we can get to 17 bytes

~i="$i"^i;.~(1:9)

Julia, 24/21 bytes

w/o

(a=1:9).*(10 .^a.-1).÷9

and w/ macro:

a=1:9;@.a*(10^a-1)÷9

yup, 43 41 bytes

0e:{~:{~:#~0e-}0e--:0ee00e--|00e--e0e-~-}

Try it online.

Explanation:

0e           # Push 1 (push 0; pop and push exp(0))
  :          # Duplicate it
   {         # Loop while the top of the stack is >0 (without popping):
    ~        #  Swap the top two values on the stack
     :       #  Duplicate the top
      {      #  Inner loop while the top of the stack is >0 (without popping):
       ~     #   Swap the top two values on the stack
        :    #   Duplicate the top
         #   #   Pop and print it as number
       ~     #   Swap the top two values on the stack back
        0e-  #   Decrease it by 1 (push 0; pop and push exp(0); subtract)
      }      #  Stop the inner loop if the top of the stack is <=0 (without popping)
       0e--  #  Increase the current value by 1 (using the 0 that was still on the
             #  stack as: push 0 → exp(0)=1 → 0-1=-1 → --1=+1)
       :     #  Duplicate the top again
        0ee00e--|00e--e0e-
             #  Push 9.107... (see below)
         ~   #  Swap the top two values again
          -  #  Subtract the current value from the 9.107...
   }         # Stop the outer loop if the top of the stack is <=0 (without popping)
             # (which it will be once we've reached 10)

0ee00e--|00e--e0e- # Push 9.107...:
0                  #  Push 0        - STACK: 0
 e                 #  exp(0)        - STACK: 1
  e                #  exp(1)        - STACK: 2.718...
   0               #  Push 0        - STACK: 2.718...,0
    0              #  Push 0        - STACK: 2.718...,0,0
     e             #  exp(0)        - STACK: 2.718...,0,1
      -            #  Subtract      - STACK: 2.718...,-1
       -           #  Subtract      - STACK: 3.718...
        |          #  ln(3.718...)  - STACK: 1.313...
         0         #  Push 0        - STACK: 1.313...,0
          0        #  Push 0        - STACK: 1.313...,0,0
           e       #  exp(0)        - STACK: 1.313...,0,1
            -      #  Subtract      - STACK: 1.313...,-1
             -     #  Subtract      - STACK: 2.313...
              e    #  exp(2.313...) - STACK: 10.107...
               0   #  Push 0        - STACK: 10.107...,0
                e  #  exp(0)        - STACK: 10.107...,1
                 - #  Subtract      - STACK: 9.107...

Nibbles, 4 bytes (8 nibbles)

,9^$`p
,9^$`p
        # implicitly map over
,9      # integers from 1 to 9      
  ^     # replicating
   `p   # the character of each 
        # by itself times

enter image description here

Headass, 31 bytes

+^{{D^(]<)PN][}:(+++[]]]>)N^-[}

Try It Online!

Beats the naive solution (+P+PP+PPP... and so on for 54 bytes) by 23 bytes.

Outputs individual digits separated by newlines

Breakdown:

+^{{D^(]<)PN][}:(+++[]]]>)N^-[}  full program

+^                               initialize r1 to be 1
                                 r2 is already initialized to 0
  {                           }  repeat
    D^(  )     :(        )       until r1
                 +++[]]]>        fails to be less than 9
   {          }                    repeat
    D^(  )                         until r1
       ]<                          fails to be more than r2
    D     P                          print r1
           N][                       increment r2
                                   end repeat
                          N^       increment r1
                          N -[     set r2 to 0
                                 end repeat

Prolog (SWI), 43 bytes

:-between(1,9,N),between(1,N,_),\+write(N).

Try it online!

Regenerate -a, 15 bytes

([1-9])$1{$1-1}

Outputs 1 through 999999999 on separate lines. Attempt This Online!

Explanation

The -a flag outputs all possible matches on separate lines.

([1-9])$1{$1-1}
 [1-9]           Pick a digit 1 thru 9
(     )          Store it in group 1
       $1        Match group 1 again
         {    }  this many times:
          $1       Group 1 contents
            -1     minus 1

Alternate -a solution, also 15 bytes:

([1-9])(){1,$1}

Outputs digits on separate lines. Attempt This Online!

([1-9])(){1,$1}
 [1-9]           Pick a digit 1 thru 9
(     )          Store it in group 1
       ()        Match empty string
         {    }  this many times:
          1,       Minimum of once
            $1     Maximum of (group 1 contents) times

Regenerate, 15 bytes

(#1{#1} ! ){10}

Outputs space-separated runs of digits, with a leading and a trailing space. Attempt This Online!

Explanation

Spaces are replaced with underscores for clarity.

(#1{#1}_!_){10}
           {10}  Repeat 10 times
(         )      and store as group 1 after each match:
 #1                Length of previous match of group 1
   {#1}            repeated (length of previous match of group 1) times
       _           followed by a space
        !          Or, if that failed because there was no previous match of group 1,
         _         just a space

The first match of group 1 is a space, which has length 1, so the second match is one 1 followed by a space, which has length 2, so the third match is two 2's followed by a space, and so forth.

Husk, 5 bytes

d´Ṙḣ9

Try it online!

Output: 122333444455555666666777777788888888999999999.

Desmos, 21 bytes

l=[1...9]
l10^l/9-l/9

Try It On Desmos!

Try It On Desmos! - Prettified

Uses the following formula for the \$n\$th number: $$\frac{10^n-1}9\times n$$ [1,22,333,4444,55555,666666,7777777,88888888,999999999] is the value of the list in the second line.

Made it look "obfuscated" for fun but it's really just the same as:

l=[1...9]
l(10^l-1)/9

which is also 21 bytes.

Malbolge, 175 bytes

(C%;_#"~[}43WVxwuRt+*NMLmlljGig}CBAc?=vNtLr[v64m321/RzP+Ncha&&Gc#EDBX|{zx=vv:bs6p^]nllk/iVgfdvD'`N#?\\6YY3WUwvvQtPOqLo,JIHGihfCddcx>=<;:9[Y6XVl210/.-O+MLJ`&HG\[!~}|{z>=wv998rp

Try it online!

Excel, 29 24 bytes

Saved 5 bytes thanks to Taylor Raine

=REPT(ROW(1:9),ROW(1:9))

ROW(1:9) returns an array of the numbers 1 through 9 so the REPT() function repeats each of those numbers itself-many times.

Screenshot

Pure Zsh, 27 bytes

eval ';s+=1;<<<$[s*'{1..9}]

Attempt This Online!

Haskell, 21 bytes

[c<$[1..c]|c<-[1..9]]

Try it online!

A list of lists of numbers.

23 bytes

replicate<*>id=<<[1..9]

Try it online!

A flat list of numbers.

Add++ -i, 14 13 bytes

L,9Rdz£XbUBvn

Try it online!

This is making me cry. A fun feature of like 99% of stack commands is that it applies to the whole stack rather than the top of the stack. Very very helpful.

-1 thanks to caird which kinda makes up for the suffering of this

Explained

L,9Rdz£XbUBvn
L,              # Start a lambda which is called implicitly by the -i flag
  9R            # Push the range [1...9]
    dz          # and zip it with itself, giving [[1, 1], [2, 2] ... [9, 9]]
      £X        # repeat x[0] by x[1] times for each x in that
        bU      # dump the contents of that onto the stack. This is a very important part because as I said, 99% of lambda stack commands map over to the whole stack, even when using quicks and stuff.
          Bv    # join each item (on the stack...) into a single integer
            n   # and join (the stack...) on newlines

Pip, 5 bytes

,tX,t

Attempt This Online!

Explanation

,t     Range(10)
  X    String-repeat (itemwise)
   ,t  Range(10)

That is, for each number in [0; 1; 2; 3; 4; 5; 6; 7; 8; 9], repeat it a number of times equal to itself. The result is the list [""; 1; 22; 333; 4444; 55555; 666666; 7777777; 88888888; 999999999], which is by default concatenated together and printed.

APOL, 21 bytes

ⅎ(9 p(*(t(∈) ∈)))

Wolfram Language (Mathematica), 17 bytes

Table[,{,9},{a,}]

Try it online!

thanks @att

Lua, 37 bytes

for i=1,9 do print((""..i):rep(i))end

Try it online!

TI-Basic, 17 bytes

seq(I(₁₀^(I)-1)/9,I,1,9

Output is stored in Ans as a list and displayed.

A0A0, 46 bytes

O122333444455555666666777777788888888999999999

Literally prints the example output. I'd be very surprised if you can get something smaller in A0A0. The first O outputs the number following it and the number following it is the output. The language specification does not state any restriction on the size of the number, just "signed integer", so this works. (Although an interpreter may not handle this correctly, because this is a 147 bit number and not every language may support numbers that large.)

Vyxal j, 3 bytes

9ƛẋ

Try it Online!

-1 thanks to lyxal

Factor, 29 bytes

9 [1,b] [ dup <array> ] map .

Try it online!

JavaScript, 50 bytes

_=>{for(i=0;++i<10;)console.log((''+i).repeat(i))}

Deadfish~, 194 bytes

{{i}ddddd}dc{d}{d}iiic{i}{i}ddcc{d}{d}iic{i}{i}dccc{d}{d}ic{i}{i}cccc{d}{d}c{i}{i}iccccc{d}{d}dc{i}{i}iicccccc{d}{d}ddc{i}{i}iiiccccccc{d}{d}dddc{i}{i}iiiicccccccc{d}{d}ddddc{i}{i}iiiiiccccccccc

Try it online!

AWK, 32 or 37 bytes

This code needs an EOF at the prompt, or a file with an empty line.

{for(;++i<10;)print(10^i-1)/9*i}

Try it online!

To substitute the input, one can use the BEGIN pattern, adding 5 more bytes to the code.

BEGIN{for(;++i<10;)print(10^i-1)/9*i}

Scala, 35 26 bytes

-9 bytes thanks to user!

()=>1 to 9 map(i=>s"$i"*i)

Try it online!

Canvas, 6 bytes

9{:ŗ×]

Try it here!

jq (-nr), 20 19 characters

range(9)+1|"\(.)"*.

Thanks to:

Sample run:

bash-5.0$ jq -nr 'range(9)+1|"\(.)"*.'
1
22
333
4444
55555
666666
7777777
88888888
999999999

Try it online!

mlochbaum/BQN, 7 bytes

⥊˜¨1+↕9

Try it!

Explanation

⥊˜¨1+↕9
     ↕9 range from 0 to 8
   1+   add 1 to each
  ¨     for each element n,
⥊˜      replicate n times

Rust, 77 75 73 72 57 56 bytes

fn main(){for k in 1..10{for j in 0..k{print!("{}",k)}}}

Try it online!

And I thought Lua was verbose!

Thanks to ovs for saving 15 bytes.

Husk, 7 bytes

mod´Rḣ9

Try it online!

Husk, 7 bytes

mdg´Ṙḣ9

Try it online!

Poetic, 222 bytes

THE NUMERICAL I/O RULES
i saw a digit,o yes
o,again,i saw a number;too many
i do the I/O rules,i get a repeat
i now count to zeros
o,from one right to nine,i do digits,e.t.c
seldom a newline,since i know i am swayed not to

Try it online!

brainfuck, 50 bytes

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

Try it online!

Assumes byte cells; does not go out of bounds to left.

Java 11 (JDK), 60 59 bytes

Not sure if thats the shortest approach but couldn`t make it shorter even without System.out.print. Output is without delimiters.

-1 byte thanks to Kevin Cruijssen

v->{for(int i=0;i++<9;System.out.print((i+"").repeat(i)));}

Try it online!

x86-16 machine code, IBM PC DOS, 18 16 bytes

Binary:

00000000: b839 0ab2 09b1 2dcd 1048 2aca 4a75 f8c3  .9....-..H*.Ju..

Listing:

B8 0A39     MOV  AX, 0A39H              ; AH = 0AH, AL = '9'
B2 0A       MOV  DL, 10                 ; DL as counter value
B1 2D       MOV  CL, 1+2+3+4+5+6+7+8+9  ; start digit repeat 45 times
        NLOOP:
CD 10       INT  10H                    ; call BIOS - write digit * CX times
48          DEC  AX                     ; decrement ASCII digit
4A          DEC  DX                     ; decrement counter value
2A CA       SUB  CL, DL                 ; reduce digit repeat value by counter
75 F8       JNZ  NLOOP                  ; loop until 0 
C3          RET                         ; return to DOS

Try it online!

Explanation:

This uses the PC BIOS API's INT 10H / 0AH function to write the ASCII char in AL to the screen CX number of times. However, this function does not update the cursor position to the end of the output -- it just stays where it started. In other words, the next call simply overstrikes existing characters writing over them. Making a BIOS call to advance the cursor is expensive byte-wise.

Since going forward isn't going to work, we go backwards starting from '9'. It writes '9' 45 times, then '8' 36 times, '7' 28 times, etc -- each time starting from the first column overwriting like so:

999999999999999999999999999999999999999999999
888888888888888888888888888888888888999999999
777777777777777777777777777788888888999999999
666666666666666666666777777788888888999999999
555555555555555666666777777788888888999999999
444444444455555666666777777788888888999999999
333333444455555666666777777788888888999999999
222333444455555666666777777788888888999999999
122333444455555666666777777788888888999999999

Output:

enter image description here

Python 3, 34 bytes

for i in range(10):print(str(i)*i)

Try it online!

Brainetry, 451 bytes

This is the golfed version, ungolfed version below.

a b c d
a b c d e f g h
a b c d e f g h
a b c
a b c d
a b
a b c d e
a b
a b c d
a b c d
a b c d
a b c d
a b c d
a b c
a b c d e f g h i
a b
a b c d
a b c d e f g h i
a b c
a b c
a b c d e
a b c d e
a b c
a b c d e
a b c d e f g h
a b
a b
a b c d
a b c d e f g h
a b c
a b c d e f g
a b
a b c d e
a b
a b c d
a b c
a b c d e f g h i
a b
a b c d e f g h
a b c
a b c d
a b
a b c d e
a b c d e f g h i
a b c
a b c
a b c d
a b c
a b c d e
a b c d e f g h i

To try this online, follow this link and paste the code in the btry/replit.btry file, then hit the green "Run" button.

Golfed version of the program below:

Let me explain what
is going on with this brainetry program: this
program will print the digits one to nine
and each of
those is going to
be repeated
as many times as its
own value.
Makes sense, doesn't it?
To achieve such result
we have to play
around with some nice
values in our tape.
That, and we
also have to play smart with our program pointer.
Of course
I would be delighted
to actually explain the algorithm used by this program.
The only problem
is I really
have no idea whatsoever about
what is actually going on.
Let me explain:
brainetry's instructions are a superset
of brainfuck, which means any brainfuck program can
be translated
to brainetry
and it will work.
So this is what I did, I found
a brainfuck program
that completed this task I described and
I just
translated it from brainfuck to
brainetry. Probably
there are simpler approaches
if we take
into consideration the extended operations that brainetry provides ...
However, brainetry
is still in its early stages of development
and I am
still trying to figure
out exactly
what operations to add to
brainetry. Once that set of operations becomes more well-defined
it will be
easier to harness
brainetry's power to write
computer programs. And
once that is finally done,
I will not have to steal random brainfuck programs.

This brainetry answer built on top of this answer

International Phonetic Esoteric Language, 21 bytes

{A}1ɑee0ɑbue1søɒe1søɒ

Prints 122333444455555666666777777788888888999999999.

Explanation:

{A}1ɑee0ɑbue1søɒe1søɒ
{A}1                  (push loop bounds, 1 to 10)
    ɑ                 (start loop)
     e                (push the current index)
      e0              (push loop bounds for current digit, 0 to index)
        ɑ             (start loop)
         bu           (DUP and CPRINT current digit)
           e1sø       (increment index)
               ɒ      (end loop)
                e1sø  (increment index)
                    ɒ (end loop)

Clojure, 32 bytes

(for[i(range 1 10)](repeat i i))

This results in a lists of numbers:

((1) (2 2) (3 3 3) (4 4 4 4) (5 5 5 5 5) (6 6 6 6 6 6) (7 7 7 7 7 7 7) (8 8 8 8 8 8 8 8) (9 9 9 9 9 9 9 9 9))

MAWP 0.1, 22 20 bytes

[![~!:~1A]%!9A?.%1M]

Explanation:

[      start of loop
!      duplicates top of stack
[      start of loop
~!:~   prints bottom stack value
1A     subtracts 1
]      end of loop
%      removes top of stack (0 from the counter in the previous loop)
!9A    diffeence between top value and 9
?.     if top 0, then terminate program
%      removes top value
1M     adds 1 to top value
]      end of loop

C# (Visual C# Interactive Compiler), 45 bytes

for(int j,i=0;i++<9;)for(j=i;j-->0;Write(i));

Try it online!

COW, 75 bytes

MoOMoOMoOMoOMoOMoOMoOMoOMoOMOOmoOMoOMMMmoOMMMMOOmOoOOMmoOMOomoomOomOoMOomoo

Try it online!

Uncowed

moo ]    mOo <    MOo -    oom o
MOO [    moO >    MoO +    MMM =

+++++++++[>+=>=[<o>-]<<-]

cQuents, 6 bytes

#9&$D$

Try it online!

Oh cool, another way to use cQuents!

C (gcc), 47 bytes

k;main(i){for(;9>printf("%d",i*++k);i=i*10+1);}

Try it online!

C (gcc), 49 bytes

main(i){for(;9>printf("%lX",(i*1L<<4*i++)/15););}

Try it online!

Fortran (GFortran), 38 28 bytes

print*,(10**i/9*i,i=1,9)
end

Try it online!

Edit: Turns out the program statement is optional, saving 10 bytes!

Common Lisp, 50 bytes

(loop for x from 1 to 9 do(dotimes(n x)(write x)))

Try it online!

Python 3, 38 bytes

print([str(x)*x for x in range(1,10)])

Try it online!

C++ (gcc), 59 bytes

for(int i=1;i<10;++i){for(int x=1;x<=i;++x){std::cout<<i;}}

Try it online!

Started learning c++ an hour ago, tried codegolf :)

C (gcc), 46 bytes

s;main(n){n>9||main(puts(memset(&s,n+48,n)));}

Try it online!

MathGolf, 6 5 bytes

9{îÄí

-1 byte thanks to @maxb.

Try it online.

Explanation:

9{     # Loop 9 times:
  î    #  Push the 1-based loop index
   Ä   #  Do an inner loop that many times, using a single command:
    í  #   Push the total number iterations of the outer loop
       # (after the loops, the entire stack is joined together and output implicitly)

Pure Bash, 41 37 bytes

for k in {1..9};{ echo $[10**k/9*k];}

Try it online!

dc, 25 24 22 bytes

1[ddIr^9/*n1+dA>m]dsmx

Try it online!

vJASS, 126 bytes

//! zinc
library q{function onInit(){integer x,y;string s="";for(1<=x<10){for(0<=y<x){s+=I2S(x);}}BJDebugMsg(s);}}
//! endzinc

enter image description here

C++ (gcc), 93, 65 bytes

int a;void n(){int b=a;while(b){std::cout<<a;b--;}if(a++!=9)n();}

Try it online!

The loop work is essentially the same as the previous version, but instead its own function.

It sets the starting digit -> 1 -> counter then it prints digits until the counter reaches 0. At that point it increments the digit and recalls the function until 9.

C++ (gcc), 93 bytes

int main(int n){static int a=1;int b=a;if(b>9)return 0;while(b){std::cout<<a;b--;}main(a++);}

Try it online!

Don't mind the main...

Javascript, 48 bytes

for(x=1;x<=9;x++){console.log((x+'').repeat(x))}

Try it online!

[VBA] 58 bytes

i=1:While i<0:For x=1 to i:Debug.Print i:Next x:i=i+1:wend

Can be ran in Immediate

Gol><>, 8 bytes

aFLRL|D;

Try it online!

aF   |   For Loop, from 0 to 10 excluding 10
  L      Push the current loop iteration to the stack
   RL    Pop the current iteration and repeat pushing the loopiterator value so many times
      D; Print the entire stack content as numeric values with the debug operation and halt

J, 18 bytes

echo u:(#48+])i.10

Try it online!

K (oK), 11 10 bytes

-1 byte thanks to ngn!

,/${x}#!10

Try it online!

Whitespace, 109 bytes

[S S S T    S S T   N
_Push_9][N
S S N
_Create_Label_LOOP][S N
S _Duplicate_top][N
S S S N
_Create_Label_INNER_LOOP][S S S T   N
_Push_1][T  S S T   _Subtract][S N
S _Duplicate_top][N
T   S T N
_If_0_Jump_to_Label_DONE_INNER_LOOP][S T    S S T   N
_Copy_0-based_1st][S N
T   _Swap_top_two][N
S N
S N
_Jump_to_Label_INNER_LOOP][N
S S T   N
_Create_Label_DONE_INNER_LOOP][S N
N
_Discard_top][S N
S _Duplicate_top][S S S T   N
_Push_1][T  S S T   _Subtract][S N
S _Duplicate_top][N
T   S S S N
_If_0_Jump_to_Label_DONE_LOOP][N
S N
N
_Jump_to_Label_LOOP][N
S S S S N
_Create_Label_DONE_LOOP][S N
N
_Discard_top][N
S S S T N
_Create_Label_PRINT_LOOP][T N
S T _Print_top_as_integer][N
S N
S T N
_Jump_to_Label_PRINT_LOOP]

Letters S (space), T (tab), and N (new-line) added as highlighting only.
[..._some_action] added as explanation only.

Try it online (with raw spaces, tabs and new-lines only).

Explanation in pseudo-code:

Push n=9
Start LOOP:
  Duplicate top (Integer i = n)
  Start INNER_LOOP
    i = i - 1
    if(i == 0):
      Jump to DONE_INNER_LOOP
    Copy n (0-based index 1)
    Swap
    Go to next iteration of INNER_LOOP
  DONE_INNER_LOOP:
    Discard i
    n = n - 1
    if(n == 0):
      Jump to DONE_LOOP
    Go to next iteration of LOOP
DONE_LOOP:
  Discard n
  Start PRINT_LOOP:
    Print top as integer
    Go to next iteration of PRINT_LOOP

Funny thing is, is that outputting with the additional single leading 0 as the challenge in the Sandbox initially had, this could have been 11 bytes shorter: try it online. xD

Batch, 85 Bytes

@for /L %%A in (1 1 9)do @For /L %%B in (1 1 %%A)do @Call Set O=%%O%%%%A @Echo(%O%

TIO not available.

enter image description here

Bash + Core utilities, 27, 25 bytes

seq -f8d%f*7-v1+2/n 45|dc

Try it online!


Changed seq formatting from %0.f to %f for a 2-byte savings.

Modified to print on one line, with no delimiters, instead of having a newline after each number, just because I like that better. Same number of bytes.


This uses the formula $$\left\lfloor\frac{\big\lfloor\sqrt{8n-7}\big\rfloor+1}2\right\rfloor$$

for the \$n^{th}\$ digit, where \$n\$ goes from 1 to 45.

Japt -P, 5 4 bytes

AÇçZ

Test it

Factor, 42 39 bytes

9 [1,b] [ dup 1array swap cycle ] map .

Try it online!

Displays a list ot lists

SNOBOL4 (CSNOBOL4), 47 bytes

O OUTPUT =DUPL(X,X)
 X =LT(X,9) X + 1 :S(O)
END

Try it online!

Prints with a leading newline.

APL (Dyalog Unicode), 4 bytes

\⍨⍳9

Try it online!

How it works

⍳9        ⍝ Integers 1..9
   ⍨      ⍝ Duplicate argument on each side
     \    ⍝ Replicate each element *n* times

Examples

Index Generator:    ⍳5          =  1 2 3 4 5
Expand:             2 3 \ 1 4   =  1 1 4 4 4
Commute:            +⍨4         =  4 + 4 = 8

Stax, 5 bytes

╜├ìíy

Try it online or try it online unpacked (6 bytes).

Explanation (of the unpacked version):

Vd      # Push constant "0123456789"
  A     # Push 10
   r    # Pop and push a list in the range [0, 10)
    :B  # Repeat the characters in the string the integer amount of times:
        #  "122333444455555666666777777788888888999999999"
        # (after which the top of the stack is output implicitly as result)

PHP, 37 36 35 bytes

for(;10>$j=++$i;)for(;$j--;)echo$i;

Try it online!

-1 byte thanks to @Night2

IBM/Lotus Notes Formula Language, 56 bytes

@For(x:=1;x<10;x:=x+1;@Set("o";o:@Repeat(@Text(x);x)));o

enter image description here

Formula in a multi value form field, once again showing that the only real use for @For in Notes is Code Golf!

This is my dumbest code golf submission ever, but here it goes

SQLite, 53 bytes

SELECT'122333444455555666666777777788888888999999999'

Try it online!

Red, 30 bytes

repeat a 9[repeat b a[prin a]]

Try it online!

Well, the most obvious way to do it is the shortest in Red.

Zsh, 30 bytes

repeat 9 echo ${(pl[++i][$i])}

Try it online!

The (l[width][fill]) flag does the heavy lifting.

Brain-Flak, 90 82 bytes

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

Try it online!

Explanation:


Compare this with the output of JoKing's autogolfer

Brain-Flak, 142 bytes

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

Try it online!


Strange delimiters, 78 bytes

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

Try it online!

If we decide to play around with our delimiters a bit, we can shave off 4 bytes. This version outputs the correct stuff but with two leading null bytes and null bytes between the chunks:

This is a tiny bit cheaty but it meets the specs of the challenge.


And for posterity here is the old super cheaty version that has been made obsolete by my golfs.

Ruby, 30 25 bytes

1.upto(9){|i|p 10**i/9*i}

Try it online!

10**i/9 gives a number with i digits, all 1s. Multiply by i for the required output.

naz, 36 bytes

1a1o1a2o1a3o1a4o1a5o1a6o1a7o1a8o1a9o

Outputs all the numbers with no extra delimiter, using the same functionality described in this answer.

R, 15 bytes

strrep(1:9,1:9)

Try it online!

Batch, 74 bytes

@set s=
@for /l %%i in (1,1,9)do @call set s=%%s%%0&call echo %%s:0=%%i%%

Outputs on separate lines. Extends the string length by 1 and replaces the character with the current digit for each output.

The call commands are required so that the variable s is processed inside the loop instead of before parsing the loop.

Japt, 4 bytes

AÇîZ

Try it

NaN

Haskell, 30 29 bytes

(<$)<*>g<$>g '9'
g c=['1'..c]

Try it online!

Python 2, 32 bytes

print[i*`i`for i in range(1,10)]

Try it online!

C (gcc), 50 bytes

n;f(i){for(i=0;i++<9;)for(n=i;n--;)putchar(48+i);}

Try it online!

Erlang (escript), 49 bytes

f()->[X*(math:pow(10,X)-1)/9||X<-lists:seq(1,9)].

Try it online!

Google Sheets, 35 bytes

=ArrayFormula(Rept(Row(1:9),Row(1:9

Sheets will automatically add three trailing parentheses when you exit the cell. Output is one line per row.

results

JavaScript (ES8), 33 bytes

f=n=>n>9?'':''.padEnd(n,n)+f(-~n)

Try it online!

Commented

f = n =>            // n = counter, initially undefined
  n > 9 ?           // if n is greater than 9:
    ''              //   stop recursion
  :                 // else:
    ''.padEnd(n, n) //   pad an empty string with n digits n
                    //   this leaves the empty string unchanged for n undefined
    + f(-~n)        //   add the result of a recursive call with n + 1

Building in reverse order (38 bytes)

A somewhat funny alternate method is to build the string from \$n=9\$ to \$n=1\$ and pad the recursive call instead of an empty string.

By doing it this way, the required padding length is:

$$L_n=\left\lfloor\frac{n^2}{2}+1\right\rfloor$$

f=(n=9)=>n?f(n-1).padEnd(n*n/2+1,n):''

Try it online!

W 5 4 3 bytes

@π┐

Uncompressed:

$*9N

Repeat 1..9 N times.

Explanation

     M % Map in the range
9      % From 1 to 9
  a$   % Stringify the current counter
 a  *  % Repeat that string by the current counter

Perl 6, 13 bytes

{1..9 Zx^9+1}

Try it online!

Anonymous code block that returns a list of strings by zip string multiplying the range 1 to 9 with itself.

Bubblegum, 23 bytes

00000000: 3334 3232 3636 3601 0253 1030 0303 7308  3422666..S.0..s.
00000010: b080 024b 1800 00                        ...K...

Try it online!

Retina, 12 bytes


9*

$.`*$.`

Try it online! Outputs a leading _ to each number, which appears to be acceptable (would cost 2 bytes to fix if not). Explanation:


9*

Insert 9 _s.


$.`*$.`

Around each _, insert its position repeated appropriately.

C (gcc), 54 53 bytes

i;j;f(){for(i=0;9/++i;)for(j=0;j++<i;)putchar(48+i);}

Try it online!

No delimiters between the numbers.

Charcoal, 5 bytes

⭆χ⭆ιι

Try it online! Link is to verbose version of code. Outputs without separators. The first StringMap could be changed into a for statement for the same byte count. Explanation:

 χ       Predefined variable 10
⭆        Map over implicit range and join
   ι     Current index
  ⭆      Map over implicit range and join
    ι    Outer index
         Implicitly print

Python 3.8, 34 bytes

i=0
while i<9:print(str(i:=i+1)*i)

Try it online!

Jelly, 5 bytes

9ẋ`€Ḍ

Try it online!

A niladic link returning a list of integers. If a program printing the numbers is preferred, subsitute Y for .

Explanation

9     | Literal 9
 ẋ`€  | Repeat each that many times
    Ḍ | Convert from decimal digits to integer

Io, 38 bytes

Range 1 to(9)map(i,i*(10**i-1)/9)print

Try it online!

Io, 47 bytes

Range 1 to(9)map(i,i asString repeated(i))print

Try it online!

brainfuck, 56 bytes

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

Try it online!

+++++++[>+++++++<-]     49 (ASCII "1")
+++++++++[              do 9 times
  <+                    add 1 to output counter
  [                     do that many times
    >>.<<               print character
    -<+>                move value of output counter to temp
  ]
  <[>+<-]               move value of temp back to output counter
  >>>+                  increment character
  <-                    decrement loop counter
]

T-SQL, 69 bytes

SELECT top 9replicate(1+number,1+number)FROM spt_values WHERE'p'=type

Try it online

05AB1E, 3 bytes

9L×

Try it online!

9L    Build a list from 1 to 9 {1, 2, 3, 4, 5, 6, 7, 8, 9}
×     copy each number that many times

Perl 5, 18 bytes

map{say$_ x$_}1..9

Try it online!

R, 18 bytes

a=1:9;(10^a-1)/9*a

Try it online!

Use the formula \$\frac{10^n-1}{9}\times n\$ for the \$n\$th number.

Kotlin, 30 bytes

{(1..9).map{"$it".repeat(it)}}

Try it online!

Icon, 27 bytes

write(1(i:=1to 9,1to i))&\z

Try it online!

PowerShell, 15 bytes

1..9|%{"$_"*$_}

Try it online!

Keg, 45 11 9 8 bytes

9Ï^⑷:⅍*⑸

Try it online!

Python 2, 28 bytes

i=1;exec"print`i`*i;i+=1;"*9

Try it online!

APL (dzaima/APL), 6 bytes

Full program, requiring ⎕IO←0.

⍋⍛⌿⍨⎕D

Try it online!

⎕D on the string "0123456789",

⍛⌿⍨ replicate the characters by

 their grade (0, 1, 2, …, 9)

APL (Dyalog Unicode), 7 bytesSBCS

⎕D/⍨⍳10

Try it online!

Uses ⎕IO←0.

How it works

⎕D/⍨⍳10
⎕D       ⍝ The string '0123456789'
  /⍨     ⍝ Replicate each of them the following times...
    ⍳10  ⍝ 0..9