Skip to main content
Commonmark migration
Source Link

#Retina, 45 bytes

Retina, 45 bytes

.+
11$&$*
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.

Takes input/output in base-ten. 1-indexed.

###Unary input, base-ten output, 1-indexed: 40 bytes

Unary input, base-ten output, 1-indexed: 40 bytes

$
11
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.

#Retina, 45 bytes

.+
11$&$*
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.

Takes input/output in base-ten. 1-indexed.

###Unary input, base-ten output, 1-indexed: 40 bytes

$
11
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.

Retina, 45 bytes

.+
11$&$*
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.

Takes input/output in base-ten. 1-indexed.

Unary input, base-ten output, 1-indexed: 40 bytes

$
11
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.

Source Link
Leaky Nun
  • 50.6k
  • 6
  • 115
  • 291

#Retina, 45 bytes

.+
11$&$*
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.

Takes input/output in base-ten. 1-indexed.

###Unary input, base-ten output, 1-indexed: 40 bytes

$
11
(111)+(1)*
$#2$#1
T`d`+0-`^.
^0.+
0

Try it online!

Test suite.