Skip to main content
added 28 characters in body
Source Link
Endenite
  • 4.1k
  • 12
  • 28

V, 1414 13 bytes

Saved 1 byte thanks to @oktupol

á199ñÄj<C-A>òa>ñç2/2
ddd

Try it online!Try it online! <C-A> represents the start of heading character (0x01)

Explanation

á1            Insert a 1 on the first line
99ñ           Repeat 99 times:
 Ä             Duplicate the last line
 j<C-A>        Increment the last line by one
òñç2/2           Repeat while there isFor aevery line containing a 2:
 ddd             Remove the line

V, 14 bytes

á199ñÄj<C-A>ò/2
dd

Try it online! <C-A> represents the start of heading character (0x01)

Explanation

á1            Insert a 1 on the first line
99ñ           Repeat 99 times:
 Ä             Duplicate the last line
 j<C-A>        Increment the last line by one
ò/2           Repeat while there is a line containing 2:
 dd            Remove the line

V, 14 13 bytes

Saved 1 byte thanks to @oktupol

á199ñÄj<C-a>ñç2/d

Try it online! <C-A> represents the start of heading character (0x01)

Explanation

á1            Insert a 1 on the first line
99ñ           Repeat 99 times:
 Ä             Duplicate the last line
 j<C-A>        Increment the last line by one
ñç2/          For every line containing a 2:
 d             Remove the line
Source Link
Endenite
  • 4.1k
  • 12
  • 28

V, 14 bytes

á199ñÄj<C-A>ò/2
dd

Try it online! <C-A> represents the start of heading character (0x01)

Explanation

á1            Insert a 1 on the first line
99ñ           Repeat 99 times:
 Ä             Duplicate the last line
 j<C-A>        Increment the last line by one
ò/2           Repeat while there is a line containing 2:
 dd            Remove the line