Skip to main content
Commonmark migration
Source Link

#Retina, 19 17 bytes

Retina, 19 17 bytes

Replace the number with unary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one.

\d+
$*10
1
-~
--

Try it online

All test cases at once (slightly modified program to support multiple test cases)

#Retina, 19 17 bytes

Replace the number with unary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one.

\d+
$*10
1
-~
--

Try it online

All test cases at once (slightly modified program to support multiple test cases)

Retina, 19 17 bytes

Replace the number with unary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one.

\d+
$*10
1
-~
--

Try it online

All test cases at once (slightly modified program to support multiple test cases)

deleted 1 character in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

#Retina, 19 17 bytes

Replace the number with binaryunary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one.

\d+
$*10
1
-~
--

Try it online

All test cases at once (slightly modified program to support multiple test cases)

#Retina, 19 17 bytes

Replace the number with binary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one.

\d+
$*10
1
-~
--

Try it online

All test cases at once (slightly modified program to support multiple test cases)

#Retina, 19 17 bytes

Replace the number with unary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one.

\d+
$*10
1
-~
--

Try it online

All test cases at once (slightly modified program to support multiple test cases)

added 1 character in body
Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

#Retina, 1919 17 bytes

Replace the number with binary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one. Put a zero on the end.

\d*\d+
$*$*10
1
-~
--
 
$
0

Try it onlineTry it online

All test cases at onceAll test cases at once (slightly modified program to support multiple test cases)

#Retina, 19 bytes

Replace the number with binary. Replace each 1 with -~. Remove double negative if there is one. Put a zero on the end.

\d*
$*
1
-~
--
 
$
0

Try it online

All test cases at once (slightly modified program to support multiple test cases)

#Retina, 19 17 bytes

Replace the number with binary, with a zero on the end. Replace each 1 with -~. Remove double negative if there is one.

\d+
$*10
1
-~
--

Try it online

All test cases at once (slightly modified program to support multiple test cases)

Source Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135
Loading