g | x | w | all
Bytes Lang Time Link
003Jalapeño250323T222349ZATaco
011AWK250323T022752Zxrs
008250322T163847Znoodle p
009Uiua250322T163729Znoodle p
031SAKO250322T161237ZAcrimori
300Bespoke250120T030705ZJosiah W
nanPiet + asciipiet220415T065504ZBubbler
010StackCell230603T184942ZStarwort
003Thunno 2230603T181738ZThe Thon
005Stax230404T140004Zemirps
009><> Fish230402T162849ZThe Thon
054Zalgo230404T010555ZBubbler
009><>230404T003226ZBubbler
016Forth gforth230402T220752Zallisonl
001Code Beautify Number to Word Converter230402T175812ZThe Empt
005vemf230327T183825Z
009Befunge98 PyFunge230329T231259Zyeah ok
052Aheui esotope230328T055553ZBubbler
040Go230328T174434Zbigyihsu
080FerNANDo230328T162904ZAlephSqu
015Julia 1.0230328T160453ZAshlin H
003Vyxal230327T214646Zlyxal
010Nim230327T194305Zxigoi
010Z80Golf230327T192310Zlynn
nan230327T191612ZThe Thon
005Rattle210819T143657Zd01
011Minecraft Command Blocks220515T214143ZLostXOR
078EEL 78 Bytes220515T210655Zuser1117
006tinylisp220417T204344Zdes54321
030Emmental220415T221045ZOhentis
012rusty_deque220415T211325Zbigyihsu
nanWolfram Language/Mathematica220415T184751ZRomanp
005TIBasic220415T144734ZYouserna
008International Phonetic Esoteric Language200916T033044Zbigyihsu
009Cascade210817T212129Zemanresu
009Factor220415T075645Zchunes
160Taxi191022T145131ZEngineer
010Red210601T155303ZAaroneou
020AWK210525T142346ZPedro Ma
004Barrel210525T104948ZLorenDB
003Vyxal210525T053841Zwasif
0168086 DOS .COM file210525T012734ZEasyasPi
00505AB1E210524T231123ZDylan Mi
003Vyxal210524T144823ZAaroneou
070Java 8 full program191021T113656ZKevin Cr
006Zsh210524T115925Zpxeger
006Knight210524T050343ZEasyasPi
032Duocentehexaquinquagesimal210518T200731ZMakonede
004Japt210406T102659ZEtheryte
005BRASCA210406T072642ZSjoerdPe
606Pxem210406T051300Zuser1004
030StupidStackLanguage200923T001938ZLebster
600VTFF200922T180408ZEthan Ch
030naz200921T201824Zsporebal
050Turing Machine Code191019T150626Zouflak
030MAWP200916T034037ZRazetime
006Pip200916T033327ZRazetime
064C# .NET Core191019T235951ZHand-E-F
004Charcoal191219T121754Zmabel
006Underload191215T005834ZMadison
800Shakespeare Programming Language191025T123911ZHello Go
005W191027T112314Zuser8505
006APL Dyalog Unicode191020T044505ZSherlock
006Hexagony191104T081534ZBubbler
030Malbolge191104T023041Zceilingc
009Tcl191025T141903ZPatrick
006Runic Enchantments191025T204228ZDraco18s
005Gaia191025T131852ZBusiness
nan191025T100344Ztrolley8
009Hexagony191024T070736Zboboquac
018C# Visual C# Interactive Compiler191024T062004Zpocki_c
020Python191023T035634Zyarr33
060Whitespace191021T122322ZKevin Cr
030Lost191021T130024ZKevin Cr
029C gcc191023T013909ZS.S. Ann
021Inform 7191022T163231ZDraconis
010TSQL191021T170829ZJuanCa
050Pepe191022T155934ZRedClove
080Hexadecimal Stacking PseudoAssembly Language191022T110203ZDorian
006dc191022T103155ZRadovan
004cat191022T102842ZStack Ex
004Excel191021T082700ZWernisch
005Erlang191022T063050ZYuri Gin
090Piet191022T034657Zgastropn
020Cubix191021T205118ZMickyT
006R191021T133138ZLeonhard
009Perl 5191021T140045ZChris
nanCommodore BASIC TheC64/Mini191021T115324ZShaun Be
018Ceylon Web IDE191020T230608ZPaŭlo Eb
009Ruby191020T213258ZG B
006PowerShell191020T213127Zgastropn
003Husk191020T205849ZFyr
009Bash191019T172736ZPaul-B98
080BrainFlak191020T143211ZWheat Wi
006MSM191020T082743Znimi
003Google Translate191020T131836ZNat
006GolfScript191019T142647Zuser8505
005Pyth191020T092157Ztrillian
015SWIProlog191020T091224Zanderium
800COW191020T080527ZNight2
010R191020T074858ZRobin Ry
030bit**191020T072603ZNight2
400Poetic191020T015151ZJosiahRy
005Scheme191020T004638ZSYZYGY-D
003Keg191019T133725Zuser8505
009Cascade191020T000008ZJo King
006Backhand191019T234810ZJo King
020C gcc191019T204048ZGammaFun
004Japt191019T213707ZShaggy
030CSS191019T134405ZNight2
010JavaScript191019T133643Zrydwolf
018Emoji191019T153019ZNight2
040brainfuck191019T184243ZLevel Ri
090Brainf***191019T183537ZHiddenBa
010Lua191019T182505Z12Me21
006BASIC191019T182256Z12Me21
040Malbolge191019T170958Zdingledo
006Zsh191019T165932ZGammaFun
00305AB1E legacy191019T162902ZAZTECCO
005Japt191019T155201ZAZTECCO
010Batch191019T151119ZNeil
005Retina 0.8.2191019T150730ZNeil
004ink191019T145755ZSara J
016Lua191019T145718Zouflak
010Labyrinth191019T141158ZJonathan
010Red191019T142254ZGalen Iv
002MathGolf191019T140210Zuser8505
015Python 3191019T140128ZJonathan
006Ruby191019T135848Zuser8505
016Python 3191019T135427Zhyperneu
003SOGL V0.12191019T135351Zthe defa
010Python 2191019T135332ZJonathan
004Jelly191019T134546ZJonathan
004PHP191019T133851ZNight2

Jalapeño, 3 bytes

◹⇥₀„

Prints four

Hex-Dump of Bytecode

       0  1  2  3  4  5  6  7  8  9  A  B  C  D  E  F
0000: 73 dd 22                                        

In a funny mirror of the Google Translate Answer, Jalapeño has a few multi-character byte representations. In this case, Hex 0xDD is represented by the glyphs ⇥₀. As such, the source code is four characters, but only 3 bytes.

Try it Online!

AWK, 11 bytes

$0="eleven"

Attempt This Online!

☾, 8 bytes

(but 6 characters)

☾"six"

Uiua, 9 bytes

&p "nine"

(the space isn't needed, just to make the code 9 chars)

SAKO, 31 bytes

1)TEKST
THIRTY ONE
STOP1
KONIEC

Prints THIRTY ONE. Pretty straightforward.

Bespoke, 300 bytes

Some characters did go inside software
You got a programmer a job to estimate
It goes out to tHRee and to HuNDReD
Confused, you say "I-I believe how it printed is not so bad"
In your defense, it never is easy for my computer to run
It clearly is one bad P.C.
Though Bespoke program counts it in full!

Outputs tHRee HuNDReD.

This is 100 bytes better than my Poetic solution. Does that mean Bespoke is 100 times better than Poetic? You be the judge.

Piet + ascii-piet, 40 bytes (3×14=42 codels)

ttllldabknmEmqusbeeeeeute_rbacqtuljvff ?

Try Piet online!

Prints FORTY. A fantastic use case of a white trap :) Also I like the fact that the program is packed so perfectly.

How it works

A classic 3-row layout with a 1 DP+ at the left edge.

Commands        Stack
2 3 dup dup *   [2 3 9]
dup dup 1 - *   [2 3 9 72]
2 -             [2 3 9 70]   Setup the stack so that repeatedly adding and
                             printing gives FORT
dup outC + dup outC +
dup 1 DP+ outC + dup outC
                [84]   Print FORT, turning right at R2C1
>               [84]   No-op (stack underflow) to take care of the crossing
5 + outC        []     Finally print Y

Piet + ascii-piet, 50 bytes (4×13=52 codels)

ttttliametf M tt iillldedMnjlvjcfll i Mkmuuljcbjjj

Try Piet online!

Prints fifty. Not sure if I can do 40, but I guess pretty much unlikely.

How it works

The execution path: First row -> (turn right) -> 3rd-to-last column -> (turn right) -> last row in reverse -> (turn right twice) -> 3rd row -> transfer to 2nd row at the red 5 block -> end.

...>>>>>>>v X
 .. ....>>+>X
>>>>>>>.. v X
^<<<<<<<<..

Commands:

Commands          Stack
6 dup 3 * 1 - *   [102]   Push 102 ('f')
dup outC          [102]   Print 'f'
dup 3 + outC      [102]   Print 'i' (= 'f' + 3)
dup outC          [102]   Print 'f'
2 dup dup +       [102 2 4]
dup * - -         [116]   Add 14 to 'f' (= 't')
dup outC          [116]   Print 't'
5 inC + outC      []      Add 5 and print 'y'
                          (inC is ignored; it is to reuse the crossing purple cell)

StackCell, 10 bytes

"net":[;:]

Explanation:

Thunno 2, 3 bytes

‘ċŀ

Attempt This Online!

Compressed string literal.

Stax, 5 bytes

äφ╓Dr

Run and debug it

Just unpacks to "five", which is then implicitly output

><> (Fish), 9 bytes

"enin">o<

Try it

Finishes with an error.

><> (Fish), 10 bytes

"net"ooo ;

Try it

Zalgo, 54 bytes

t̝̐̄̇h̝̐̈̆i̝̐̉̆r̝̐̂̇t̝̐̄̇y̝̐̉̇

Escaped with each cluster per line:

t\u031d\u0310\u0304\u0307
h\u031d\u0310\u0308\u0306
i\u031d\u0310\u0309\u0306
r\u031d\u0310\u0302\u0307
t\u031d\u0310\u0304\u0307
y\u031d\u0310\u0309\u0307

Prints thirty. Pushing a constant and printing takes 4 characters, and the first number whose length in English is strictly smaller than 1/4 of its value is 30. For stylistic reasons, each grapheme cluster in this code prints its root character (e.g. t̝̐̄̇ prints t). Python code used to generate the source.


Zalgo, 25 bytes, 1 grapheme cluster

I̝̝̝̐̏̆̐̎̆̐̅̆

Escaped:

I\u031d\u031d\u031d\u0310\u030f\u0306\u0310\u030e\u0306\u0310\u0305\u0306

Prints one. Validity of this answer depends on the definition of "character" in this challenge. Python code used to generate the source.

><>, 9 bytes

"ooooENIN

Try it online!

Prints NINE and halts with error (E is not a valid command).

Forth (gforth), 16 bytes

S" sixteen" TELL

Try it online!

I tried doing ." <number>" but that didn't line up with anything under 20. I guess I could have padded with whitespace or a 0 DROP or something but that feels like cheating. Also this should work with any sane forth, not just gforth.

Code Beautify Number to Word Converter, 1 Byte

If you input this:

1

You get one.

vemf, 6 5 bytes

"five

Outputs five. try it online

Befunge-98 (PyFunge), 9 bytes

"NINE,,@#

Try it online!

Explanation

"            Start stringmode
 NINE,,@#    Push "NINE,,@#", wrap to left
"            End stringmode
 N           Reflect (no fingerprint loaded)
"            Start stringmode, wrap to right
 NINE,,@#    Push "#@,,ENIN"
"            End stringmode, wrap to right
       @#    Jump over halt
     ,,      Print "NI"
    E        Reflect
     ,,      Print "NE"
       @     Halt

Slightly different (maybe nicer) solution

"Nine@,k3

Instead of bouncing back and forth over ,,, this just iterates it with 3k,. Also allows the subjectively nicer "Nine" instead of "NINE".

Aheui (esotope), 52 bytes

발밦밞발밞다받받밞밞따댜먛뻐더희xxxx

Try it online!

Contains 20 chars (16 hangul and 4 unused ascii) and prints TWenty. 19 seems to be out of reach. NINTeen barely fits, but the correct spelling of 19 is "nineteen".

밞바밣밞다밦발바발타밞밞따받탸먛뻐더희

Try it online!


Aheui (esotope), 40 bytes, solves for bytes instead

발박받밞밝발박따땨먛뻐더희

Try it online!

Prints FORTY. The strictly increasing nature of FORTY is useful again.

Each Hangul character costs 3 bytes, so 40 bytes can fit 13 chars and a newline. Luckily FORTY can be printed in exactly 13 chars (4 for charcode differences, 5 for the value 70, 3 for "dup; print; add" loop, and 1 for halt).

발박받밞    Push 5, 2, 3, 9
밝발박따따  Push 70 (7 * 5 * 2)
빠맣다      Loop: dup; print as char; add
            Break when add fails
희          Halt

Go, 45 40 bytes, to STDERR

package main
func main(){print("forty")}

Attempt This Online!

Go, 59 bytes, to STDOUT

package main
import."fmt"
func main(){
Print("fifty nine")}

Attempt This Online!

An extra character is needed here (in this case a newline on line 3) because if it is not, then the byte count cycles between fifty eight (59 bytes) and fifty nine (58 bytes).

FerNANDo, 80 bytes

1 1
01
10 01
0 1 1 0 01 10 0 10
0 1 1 01 10 01 0 10
0 1 1 01 01 10 10 1
01 01
01

Try it online!

Loops twice, printing "eig" on the first loop and "hty" on the second. Coincidentally, using the two-character names 01 and 10 increased the code to exactly the right length.

Julia 1.0, 15 bytes

print(:fifteen)

Try it online!

Vyxal, 3 bytes

3∆ċ

Try it Online!

Simply push the number 3 and convert it to words.

Nim, 10 bytes

echo "ten"

Attempt This Online!

Z80Golf, 10 bytes

00000000: 3e74 ff3e 65ff 3e6e ff76                 >t.>e.>n.v

Try it online!

  ld a, 't'
  rst 38h
  ld a, 'e'
  rst 38h
  ld a, 'n'
  rst 38h
  halt

Thunno, \$ 5\log_{256}(96)\approx \$ 4.12 bytes

"five

Attempt This Online!

Pretty simple.

Rattle, 5 bytes

five|

Try it Online!

This is pretty simple - it takes "five" as a variable then outputs it implicitly

Minecraft Command Blocks, 11 bytes

w @a eleven

Whispers eleven to every player

@ whispers to you: eleven

If @ whispers to you: is not allowed

tellraw @a "twenty four"

outputs just twenty four and is 24 bytes.

twenty four

EEL - 78 Bytes

=83 !>=69 !>=86 !>=69 !>=78 !>=84 !>=89 !>=32 !>=69 !>=73 !>=71 !>=72 !>=84

Explanation

EEL (Easy Esoteric Lang) is an esoteric programming language created by me, easy to manage, hence the name. Below is a brief description of the language.

.-EEL is based on a vector of bytes initialized to zero, on which basic arithmetic operations can be performed, whose length is equal to 64Kb.

.-EEL allows the reading and writing of one byte at a time in the form of an ASCII character in the standard input and output respectively.

.-EEL has a brief help section which can be viewed from the interpreter.

.-EEL is extremely sensitive, so a wrong input byte can cause a wrong output.

.-EEL does not have an error/exception handling system, so it may crash unexpectedly if a fatal error such as division by zero occurs.

Defined operations:

=000 -> Copy the value of number 000 to the current byte.

+000 -> Add to the current byte, the value of number 000.

-000 -> Subtract to the current byte, the value of number 000.

*000 -> Multiply to the current byte, the value of number 000.

/000 -> Divide to the current byte, the value of number 000 (cannot be zero).

%000 -> Calculate the modulo of the current byte and the value of number 000 (cannot be zero).

> -> Go to the next byte of the vector.

< -> Go to the previous byte of the vector.

? -> Read a ASCII character from STDIN and assign it to current byte.

! -> Write to current byte in STDOUT as an ASCII character.

: -> Open/close the space for comments.

. -> Exit the program.

$ -> Reference to current byte.

NOTES:

The 000 number can be s current byte reference operator ($).

The 000 number (x) must be an integer number, such 0 < x <= 255.

There must be a space character u+0020 after each number 000.

Try the EEL interpreter!

tinylisp, 6 bytes

Very simple solution, (q quotes the name after it to prevent it from being evaluated, the parentheses are implicitly closed at the end of the line, and the result of the top-level statement is implicitly outputted,

(q six

Try it online!

Emmental, 30 bytes

#84.#72.#73.#82.#84.#89.######

Try it online!

rusty_deque, 12 bytes

"twelve"~ol~

Wolfram Language/Mathematica, Multiple Solutions, Bytes vary

four

"seven"

Print@"fifteen"

Echo@"fifteen";

Text[+"sixteen"]

FromCharacterCode@{70,105,102,116,121,32,70,73,118,101}

All of these work and are quite trivial, except for the last one, which actually took a bit of thought.

TI-Basic, 5 bytes

"FIVE

Also works with "SEVEN".

International Phonetic Esoteric Language, 8 bytes

"eight"o

Pushes and prints the string "eight".

Cascade, 9 bytes

"
n
i
n
e

Try it online!

Don't know why I didn't think of this earlier.

Factor, 9 bytes

[I nineI]

Attempt This Online!

Taxi, 164 160 bytes

"One hundred sixty" is waiting at Writer's Depot.
Go to Writer's Depot: w 1 r 3 l 2 l.
Pickup a passenger going to Post Office.
Go to Post Office:n 1 r 2 r 1 l.

Try it online!

This also throws an error because I don't return the taxi to the garage so my boss fires me. It's not a requirement to not throw errors, though, so I guess I'm fired.

Red, 10 bytes

prin "ten"

Try it online!

AWK, 20 bytes

BEGIN{print"twenty"}

Try it online!

Barrel, 4 bytes

four

Implicitly prints the unknown instructions "four". However, this could potentially be voided by later modifications, so here's a safe 5-byter that uses a string:

'five

Vyxal, 3 bytes

`∧ḭ

Try it Online!

Dictionary compression FTW!!!

8086 DOS .COM file, 16 bytes

Hexdump:

0CD5:0100  B4 09 BA 08 01 CD 21 C3-73 69 78 74 65 65 6E 24 ......!.sixteen$

Assembly source:

        // NASM syntax with C comments because no SE highlighting
        [org 0x100]
        section .text
        global start
start:
        // int 21:09: write $-terminated string in ds:dx
        mov     ah, 0x09
        mov     dx, str
        int     0x21
        // exit
        ret
str:
        db      "sixteen$"

8086 DOS .COM file, dirty exit, 10 bytes

This one prints "ten" and then does whatever, likely in the form of a crash.

0CD5:0100  B4 09 BA 07 01 CD 21 74-65 6E                   ......!ten
        // NASM syntax with C comments because no SE highlighting
        [org 0x100]
        section .text
        global start
start:
        // int 21:09: write $-terminated string in ds:dx
        // but it prints even if it isn't $-terminated so why bother?
        // It's real mode, it'll find a $ eventually™
        mov     ah, 0x09
        mov     dx, str
        int     0x21
        // exit
        // jk
str:    // not $ terminated
        db      "ten"

everything is fine

05AB1E, 5 bytes

"five

Try it online!

Vyxal, 3 bytes

`∧ḭ

Try it Online!

Pushes "three" as a dictionary-compressed string and implicitly outputs.

Java 8 (full program), 75 70 bytes

interface M{static void main(String[]a){System.out.print("seventy");}}

-5 bytes thanks to @CommandMaster.

Try it online.

Java 8 (lambda function), 9 bytes

v->"nine"

Try it online.

Java 5/6 (full program), 40 bytes

enum M{A;{System.out.print("forty");}}//

No online compiler, because I don't know any for Java 5 or 6..
The trailing // are no-ops, but outputting forty is shorter.

Zsh, 6 bytes

<<<six

Try it online!

Knight, 6 bytes

O"six"

Try it online!

Not much to explain; O is shorthand for OUTPUT.

Duocentehexaquinquagesimal, 39 32 bytes

ÖtΛ‰[WåÙUYr™{—*l”î)‘RçÊí¹©ÓûŽUQ‹

Try it online!

Japt, 4 bytes

Lucked out that the string compression found anything to compress in one of the smaller numbers.

`f r
`    // Decompress compressed string
 f r // Compressed string literal for "four"

Try it here.

BRASCA, 5 bytes

`five

Try it!

Explanation

`five      - Push "five" on the stack, char by char
<implicit> - Print the stack, reversed

Pxem, Filename: 6 bytes + Content: 0 bytes = 6 bytes.

Sorry for a boring post.

Try it online!

StupidStackLanguage, 55 30 bytes

avvdqvdmdfwwddfifvvdfiifvfaaaa

Try it online!

I found this by generating a list of numbers 1 - 100 as words, and then mapping said array with my StupidStackLanguage printing algorithm to generate an array of number printing programs. I then padded each program in the array with meaningless a characters until the number of characters it had equalled it's position in the array. Then, I just found the first program which had the same length as the number it printed.

VTFF, 1524 600 bytes

-924 bytes thanks to Jo King

New answer:


Readable version:

VVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVFVFVFVVVVVVVVVVVVFVFVFVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVV

For info on how the lang works, I can't be bothered to rewrite it all, so see the old answer:


Those bytes can be seen in the source code of this answer. They could be earlier, but they're apparently gone now. Alternatively, here it is with Vertical Tab characters replaced with Vs and Form Feeds replaced with Fs:

VVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVFVVV

Try it out here by putting the string "ONE THOUSAND FIVE HUNDRED TWENTY FOUR" in "Generate", then copying the output of that into "Interpret".

Explanation: VTFF is a language I found by hitting Random page on the Esolangs wiki a lot. The only characters are the vertical tab (0x0b) and form feed (0x0c), hereafter referred to as just V and F. Each block of V characters separated by F characters represents a number in unary. 32 is then added to that number and it is then converted into a character. This repeats until a string is built. That string is then sent to a JS eval statement, the output of which is the output of the program. Because the positions of out characters on the Unicode code table matter, capital letters are preferable to lowercase ones, because their unary representations are 32 bytes shorter. That said, if it ended up being 32 or 64 low I was happy to sprinkle in some lowercases if need be, but thankfully that didn't turn out to be the case. I obtained this with 15 minutes or so of manual brute forcing, where it quickly became clear that the 1500s would be easiest. If you automated the process, I imagine you could dip into the 1400s. Maybe there's even a really lucky one where you don't need all four digits. "FIVE HUNDRED" comes out at a frustrating 499 characters, for example.

Bonus fact: if you did this in binary VTFF (an imaginary language I just made up where it's just VTFF encoded in binary), you could get this down to just "FOURTY" bytes.

naz, 30 bytes

9a9m3a1o9s3s1o1a1o9a1o2a1o5a1o

Outputs THIRTY.

Turing Machine Code, 60 50 bytes

0 _ f r 1
1 _ i r 2
2 _ f r 3
3 _ t r 4
4 _ y r 50

Try it online!

As an added bonus, if that counts for anything, it has the number in the code as well.

Edit: Found a shorter solution which still contains the number of bytes in the code.

MAWP, 30 bytes

99W3M!;98W!;1M;2A!;2M!;11MM3M;

Try it!

prints in capitals.

Pip, 6 bytes

"six";

Try it online!

; is a comment.

C# (.NET Core), 64 bytes

class P{static void Main(){System.Console.Write("sixty four");}}

I had to see what a non-competitive language would score.

Try it online!

Charcoal, 4 bytes

four

Try it online

The program just implicitly prints the string literal.

Underload, 6 bytes

Try it online! (six)S

Explanation

(six)  Puts the text "six" onto the stack.
S      Prints it.

Shakespeare Programming Language, 800 bytes

Try it online!

(Whitespace added for readability)

800 Bytes---- filler.Ajax,.Puck,.Act I:.
Scene I:.[Enter Ajax and Puck]Ajax:
You is the sum ofthe sum ofthe cube ofa big big cat a big big cat a cat.Speak thy.
You is the sum ofyou a big big cat.Speak thy.
You is the sum ofyou a big pig.Speak thy.
You is the sum ofyou a cat.Speak thy.
You is the sum ofyou twice twice the sum ofa big cat a cat.Speak thy.
You big big big big big cat.Speak thy.
You is twice the sum ofyou a big big cat.Remember you.Speak thy.
You is the sum oftwice you the cube ofthe sum ofa big pig a pig.Speak thy.
You is the sum ofyou the sum ofa big big big pig a cat.Speak thy.
Recall.You is the sum ofyou a big big pig.Remember you.Remember you.Speak thy.
You is the sum ofyou twice the sum ofa big big big cat a pig.Speak thy.
Recall.You is the sum ofyou a cat.Speak thy.
Recall.Speak thy.

Prints EIGHT HunDRED. The math to get from one letter to another was very complicated and there was little room for error. This is probably improvable in terms of code, but 700 is most likely impossible. Little improvement saving 2 bytes in the actual code because I missed out on optimizing 2*(4+2) to 2*2*(2+1) for some reason.

W, 5 bytes

five"

Implicitly prepends a quote. In order to specify your input, find prog.py and do this:

read = []

prog = 'five"'

Wren, 26 bytes

Just a method that outputs a string literal.

System.write("twenty six")

Try it online!

APL (Dyalog Unicode), 12 9 6 bytes

Took me a little searching and I don't like requiring the extra spaces, but such are the vagaries of English numbers.

Edit: -3 bytes thanks to Night2. -3 bytes thanks to ngn.

⊢'six'

Try it online! And a slightly different version to get it to work on Try it online!

Hexagony, 6 bytes, 17 cycles

s;i>x@

Try it online!

Now the letters six are in more natural order, and the program finishes one cycle faster.

How it works

For more thorough explanation, see the previous answer below.

 A B
C > D
 E .
Execution path: ABC>CBAD>ADB.>.CE
                ^^  ^^    ^^    ^
                s;  i;    x;    @

Hexagony, 6 bytes, 18 cycles

x>i;s@

Try it online!

Inspired by boboquack's 9-byte solution. The following quote was a big hint:

I'm slightly disappointed that I couldn't get six to work (that would be pushing it with three characters, one output, one redirection and one termination).

How it works (or, How I got to this solution)

A 6-byte program is laid out on a hexagon of side length 2, and the 7th instruction is necessarily a no-op:

 ? ?
? ? ?
 ? .

Since I needed at least one mirror, I tried out various mirrors placed at various places, until I found this:

 A >
B C D
 E .

Assuming the current memory is always positive (and there are no branches/mirrors/IP changers among ABCDE), the IP follows the path

A>ADCB>.CAD>DAC.BE

The cell C is run exactly three times, and the cells right before C are D, B, and A respectively. And the cell E is first run after three runs of C. This is exactly what we want: write one of s, i, or x on the memory and print it, and then terminate!

Now back to the actual source code:

 x >
i ; s
 @ .

And the execution path, linearized, with significant instructions emphasized:

x>xs;i>.;xs>sx;.i@
   ^^^  ^    ^^  ^
   ^^              Print 's'
     ^  ^          Print 'i'
             ^^    Print 'x'
                 ^ Terminate

Malbolge, 30 bytes

('B;_#!~[|:9zVw/.uQrOqon&Jl6"'

Try it online!

Created with ZB3's Malbolge Tools

Tcl, 9 bytes

puts nine

prints

nine

Try it online!

Tcl, a lot more bytes (not finished yet) currently 42

this will read the source code counts the characters and convert the number into an actual number word.

content of c.tcl:

puts [string length [read [open c.tcl r]]]

prints:

% 42

Runic Enchantments, 6 bytes

"Six"@

Try it online!

This ended up being both much shorter and much less interesting than I anticipated. 3 bytes are required for syntax, making it impossible to go lower.

Gaia, 5 bytes

five”

Just a string literal that gets implicitly output.

Try it online!

Some answers with "production" (i.e. non-golfing) languages still not mentioned here:

C++ (clang), 55 bytes

#include<iostream>
int main(){std::cout<<"fifty five";}

Try it online!

Scala, 23 bytes

println("twenty three")

Try it online!

Haskell, 27 24 bytes

main=putStr"twenty four"

Try it online!

Hexagony, 9 bytes

n;i;@;e\\

Try it online!

I'm slightly disappointed that I couldn't get six to work (that would be pushing it with three characters, one output, one redirection and one termination).

Not How it works

This Hexagony program looks almost like normal code!

n;i;@;e\\
n;i;       Pushes n and prints it, then pushes i and prints it
    @;     Retrieves the bottom of the stack (n) and prints it
      e\\  Pushes e and terminates the program, printing implicitly

How it works

nine.png

Input starts on the blue path, storing the value n then printing it with ;. It picks up the value i, then jumps to the third line where it hits a mirror. This takes it to the diagonal path, reentering the value i then printing it with ;.

From the bottom left corner, since the current value of i is truthy, it jumps to the red stream starting in the top-left corner, taking n then printing it with ;. The two mirrors redirect it and then it jumps to the e. Finally, it jumps from the middle of the bottom edge to the middle of the top edge, printing the e with ; and terminating with @.


Thanks to Timwi for their HexagonyColorer.

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

Write("eighteen ")

Try it online!

Python, 20 bytes

print("twenty")#lol.

hey! that's python code length is actually 20 characters. I know, It's cheating but the comment is still a text.

print("twenty") 

prints the number. (15 chars)

#lol.

a useless comment. (5 chars)

so 5+15=20 and 20 is twenty, right?

Whitespace, 151 60 bytes

[S S S T    T   S N
_Push_6_Y][S S S T  N
_Push_1_T][S S S T  S T N
_Push_5_X][S S T    T   S T S N
_Push_-10_I][S S S S S N
_Push_0_S_(with_two_additional_no-op_spaces)[N
S S N
_Create_Label_LOOP][S S S T S T S S T   T   N
_Push_constant_83][T    S S S _Add_top_two][T   N
S S _Print_as_character][N
S N
N
_Jump_to_Label_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).

Whopping -91 bytes thanks to @JoKing by using an < instead of == check in my Java program below and adding no-ops.

Shortest program generated with this Java program, which uses the printing approach of this Whitespace tip to output in full uppercase.

Lost, 30 bytes

v<<<<<<<>>>>>>>
>%?"thirt/J"+@

Contains the unprintable character ESC with unicode value 27 after the ^ on the second line. Thanks to @JoKing getting rid of the unprintable (for the same byte-count).

Try it online or verify that it's deterministic.

Explanation:

Explanation of the language in general:

Lost is a 2D path-walking language. Most 2D path-walking languages start at the top-left position and travel towards the right by default. Lost is unique however, in that both the start position AND starting direction it travels in is completely random. So making the program deterministic, meaning it will have the same output regardless of where it starts or travels, can be quite tricky.

A Lost program of 2 rows and 5 characters per row can have 40 possible program flows. It can start on any one of the 10 characters in the program, and it can start traveling up/north, down/south, left/west, or right/east.

In Lost you therefore want to lead everything to a starting position, so it'll follow the designed path you want it to. In addition, you'll usually have to clean the stack when it starts somewhere in the middle.

Explanation of the program:

All arrows, including the reflect / in the string, will lead the path towards the leading > on the second line. From there the program flow is as follows:

Two things to note:

The top part could also have been v<<<<<<<<<<<<<< instead. Lost will wrap around to the other side when moving in a direction. So using v<<<<<<<>>>>>>> could be a slightly shorter path, and since it's the same byte-count anyway, why not use it. :)
Also, the first line contains an additional trailing > to make the byte-count from 29 to 30.

C (gcc), 29 bytes

main(){puts("twenty nine");;}

It's an actual program...

Try it online!

Inform 7, 21 bytes

To q:say 21 in words.

This creates a function which takes no arguments and returns nothing, which prints the word "twenty-one".

Some boilerplate showing how to call the function:

X is a room.
When play begins: q.

Unfortunately, hardcoding the string tends to put me at a number of characters that's harder to print.

T-SQL, 10 bytes

print'ten'

I guess is correct, right? :)

Pepe, 50 bytes

reeEEeeEEereeEEeEeeEreeEEeeEEereeEEEeEeereeEEEEeeE

Try it online!

Hexadecimal Stacking Pseudo-Assembly Language, 80 bytes

200079400000200074400000200068400000
200067400000200069400000200045400000
140000

Try it online!

dc, 6 bytes

[six]P

prints:

six

cat, 4 bytes

four

There are plenty of literal "four" answers already, but not one written in cat yet.

Excel, 4 bytes

four

Uninteresting answer, not using a formula.


Excel, 5 bytes

'five

Using a formula, requires at least 3 extra bytes (=, ", ").

Excel, 6 bytes

="six"

Excel, 12 bytes

="tw"&"elve"
=T("twelve")

Excel, 14 bytes

=T("fourteen")

Excel, 16 bytes

=IF(1,"sixteen")

Excel, 18 bytes and upwards

=TRIM(" % ")

Insert required text, padded with required whitespace.

Erlang, 5 bytes

five.

Enter this code at interpreter prompt.

Piet, 90 codels

enter image description here

Try it online!

In pseudo-code:

The characters are pushed onto stack. To save space, their ASCII values minus 100 are stored. When the string is built, a loop pops, adds 100 to, and prints each character to STDOUT.

    ; Place sentinel 0 on stack
    push 1
    not

    ; Place 21 (y) on stack
    push 7
    push 3
    mul

    ; Place 16 (t) on stack
    push 4
    dup
    mul

    ; Place 1, 10, 5, 10 (e, n, i, n) on stack
    push 1
    push 10
    push 5
    push 10

    ; Check if top of stack is non-zero
    ; Place a 1 if it is, a 0 otherwise
    dup
    not
    not

write_loop:
    ; Turn DP (Direction Pointer) as many steps
    ; clock-wise as value on top of stack
    ; If we had a zero on stack, we continue into
    ; the yellow area and get trapped, ending execution
    pointer

    ; If not, we continue
    ; Add 100 to top of stack
    push 5
    push 4
    push 5
    mul
    mul
    add

    ; Pop and print character
    outc

    ; Turn DP one step to the right
    push 1
    pointer

    dup
    not
    not

    ; Check if top of stack is non-zero
    ; Place a 1 if it is, a 0 otherwise
    dup
    not
    not

    ; We're now back at beginning of the writing loop, sort of like a jmp write_loop

Cubix, 20 bytes

/o;."uytnewT.p^@!<..

Try it online!

This wraps onto the cube as follows

    / o
    ; .
" u y t n e w T
. p ^ @ ! < . .
    . .
    . .

Watch it run

R, 7 6 bytes

 "six" #space before the text

Previously:

"seven"

Perl 5, 9 bytes

say"nine"

Try it online!

Commodore BASIC (TheC64/Mini, C64/128, VIC-20, PET, C16/+4) 25 tokenised and BASIC bytes

 0 print"seventeen

I could use the abbreviated ? but when listed the program will show the full print keyword. In any case it would make no difference to the byte count as ? and print use the same number of BASIC tokens.

Ceylon (Web IDE), 18 bytes

The Ceylon Web IDE allows to omit all the boilerplate which makes up a normal program, so we can use just the actual print statement:

print("eighteen");

Try it online!

Ceylon (with run function), 30 bytes

void run() { print("thirty");}

Try it online!

Ruby, 9 bytes

puts:nine

Try it online!

Longer than the other answer, but does not output extra characters

PowerShell, 6 bytes

Note the space before the first quotation mark.

 "six"

Try it online!

Husk, 3 bytes

¨◊ė

Try it online!

Bash, 15 9 bytes

echo nine

Try it online!

Thanks to:
- @Night2 for saving me 6 bytes

Brain-Flak, 80 bytes

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

Try it online!

The code to push eighty is 72 bytes and we add an extra 8 bytes to bring it to the correct amount.

Brain-Flak, 80 bytes

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

Try it online!

This version pushes EIGHTY and requires 12 bytes of padding.

MSM, 11 9 6 bytes

xsi/..

The 3 letters are pushed on the stack, / swaps s and i to get the correct (reverse) order and the two 3 dots concatenate them to a single string. There are variants such as '.xis. or ?..xis.

Try it online!

Edit: -3 bytes thanks to @Night2

Google Translate (3 bytes)

Try it online!

It's the Chinese character for "one" (matching the number of characters in the source code), though the score's due to the character itself being 3 bytes.


Google Translate (3 bytes)

tre

Try it online!

It's Italian for "three".

GolfScript, 6 bytes

Push six. Implicit print.

 'six'

Try it online!

Pyth, 5 bytes

"five

Try it online!

I don't think it's possible to get shorter than this. The overhead for compressed strings is 4 bytes already, so it's impossible to also get a 4-byte message in it.

SWI-Prolog, 15 bytes

write(fifteen).

Try it online!

COW, 800 bytes

MoO!!
MoO MoO!!
MoO MoO MoO!!
MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MMM MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO Moo MoO MoO MoO MoO Moo MOo MOo!!
Moo MoO Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO Moo MMM Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO!!
Moo MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MOo MOo!!
MOo MOo MOo MOo MOo Moo MOo MOo MOo MOo MOo MOo MOo MOo MOo MOo Moo MMM!!
MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO MoO Moo MMM MoO Moo MOo Moo!

Try it online!

Prints EIGHT HUNDRED

R, 10 bytes

cat("ten")

Try it online!

Prints ten. This simple answer is much shorter than all the other options I could think of.

If a bit of fluff around the answer is allowed, we can go with

R, 6 bytes

"six";

Try it online!

which prints [1] "six".

If a lot of fluff is allowed, we could even go with

R, 4 bytes

four

Try it online!

which prints to STDERR Error: object 'four' not found.

bit**, 30 bytes

#116/#104/#105/#114/#116/#121/

Try it online!

Poetic, 400 bytes

Type fourhundred chars? I say, I think I have an angle.
I say "Gosh, could I just go create some poem? Clearly it comes a long way, writing stuff I say."
I compose the entire written poem, and someone reads a tiny, tiny portion.
"Surely, it all is garbage," cried a big fat crybaby.
Would HE frankly notice how many long, tedious hours I took?
The crybaby whined a lot. I watched, then I ignored him.

Try it online!

Prints Four HunDrED. (I tried to make it print some number in the 300s, but I can't seem to do so in under 400 bytes.)

Poetic is an esolang I made in 2018 for a class project. It's basically brainfuck with word-lengths instead of symbols.

Scheme, 5 bytes

This works in any Scheme implementation, but Chicken Scheme is what I used.

'five

EDIT: Alternative 4-byte solution

four outputs this:

Error: unbound variable: four

I think this counts, but if you don't like errors, the above solution is for you.

Keg, 3 bytes

-1 from Jono2906 for reminding me the string compression

2 can play the 3 byte game!

‘0⅀

TIO

Old answer, 4 bytes

You can't get shorter than 4. (Without using string compression of course.) 4 is the smallest English word that is the same length as the number it represents.

Just some good old-fashioned Ascii/auto-pushing Keg golfing!

four

Try it online!

Explanation

four#   Push 4 onto the stack
#Implicit Print

Cascade, 9 bytes

"
n
i
n
e

Try it online!

Backhand, 6 bytes

"s"xiH

Try it online!

Outputs "six".

C (gcc), 25 20 bytes

f(){puts("twenty");}

Try it online!

Japt, 4 bytes

`fr

Test it here

CSS, 30 bytes

body::after{content:'thirty';}


CSS (Google Chrome only), 26 bytes

This should be saved in an empty file between <style> and </style> tag, doesn't work on FireFox or Stack Exchange's code snippets. Tested on Windows Chrome 77.

:after{content:'twenty six

JavaScript, 16 10 bytes

-6 each from Night2's suggestion in the comments

Try it online! (alert doesn't work in TIO, so I'm using print)

alert`ten`

Javascript, 26 20 bytes

Try it online!

console.log`twenty`;

Emoji, 18 bytes

⛽eighteen🚘➡

Try it online!


Emoji, 8 chars

⛽eight🚘➡

Try it online!

brainfuck, 40 bytes

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

Try it online!

The last three characters don't actually do anything useful, but it's easier to output forty than thirty seven.

The ascii code for f is 102, which is 2/5 of 255, found by the initial loop. After that, all the characters in the output just happen to be in ascending alphabetical order.

Brainf***, 90 bytes

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

Try it online!

Lua, 10 bytes

print"ten"

Also works in many BASIC dialects that don't have a ? shortcut for PRINT

BASIC, 6 bytes

?"SIX"

(Specifically tested in SmileBASIC: should work in most dialects, though ? is often expanded to PRINT, I think it's usually still stored as one byte)

Malbolge, 40 bytes

(CB%#9]~}5:3Wyw/4-Qrqq.'&Jkj(h~%|Bd.-==;

Zsh, 6 bytes

<<<six

Try it online!

05AB1E (legacy), 3 bytes

“„í

Try it online!

Using dictionary

Japt, 5 bytes

"five

Try it online!

Batch, 10 bytes

@ echo ten

If you think the extra space after the @ is ugly, the next possible answer is:

@echo twelve

Retina 0.8.2, 5 bytes


five

Try it online! Simply substitutes the empty input with the word five, which is the first word to have one fewer letter than its value.

ink, 4 bytes

Four

Try it online!

Predictably enough, it prints Four

Lua, 16 bytes

print('sixteen')

Try it online!

Labyrinth, 10 bytes

84.69.78.@

Try it online!

How?

  - initially the main stack contains infinite zeros    [0,0,0,...]
8 - multiply the top of the stack by ten and add eight  [8,0,0,...]
4 - multiply the top of the stack by ten and add four   [84,0,0,...]
. - pop, mod 256, print character                       T
6 - multiply the top of the stack by ten and add six    [6,0,0,...]
9 - multiply the top of the stack by ten and add nine   [69,0,0,...]
. - pop, mod 256, print character                       E
7 - multiply the top of the stack by ten and add seven  [7,0,0,...]
8 - multiply the top of the stack by ten and add eight  [78,0,0,...]
. - pop, mod 256, print character                       N
@ - exit

Red, 10 bytes

print 'ten

Try it online!

MathGolf, 2 bytes

Well, MathGolf has a string compression library that seems to compress "two" to 1 byte. You need a command to decompress this.

╩_

Try it online!

Python 3, 15 bytes

exit("fifteen")

...prints to STDERR.

Try it online! (see the "debug" panel)

Ruby, 6 bytes

Ruby has an extremely convenient builtin p that prints the string.

p'six'

Try it online!

Python 3, 16 bytes

print("sixteen")

Try it online!

Also works in Proton.

SOGL V0.12, 3 bytes

Well, SOGL has a string compression library that seems to compress "three" to 3 bytes.

@0‘

Try it Here!

Python 2, 10 bytes

print'ten'

Try it online!

Jelly, 4 bytes

“Ɱ9»

Try it online!

PHP, 4 bytes

four

Try it online!


PHP, 9 bytes

<?= nine;

Try it online!