Skip to main content
Commonmark migration
Source Link

#Perl 5, 68 bytes

Perl 5, 68 bytes

67, plus 1 for -pe instead of -e

y/0/ /;$_<${[sort@a]}[-1]&&y/1/0/for@a=split/\b/;$_=join"",@a;y; ;0

Expects and prints a string (concatenation) of 0s and 1s.

#Perl 5, 68 bytes

67, plus 1 for -pe instead of -e

y/0/ /;$_<${[sort@a]}[-1]&&y/1/0/for@a=split/\b/;$_=join"",@a;y; ;0

Expects and prints a string (concatenation) of 0s and 1s.

Perl 5, 68 bytes

67, plus 1 for -pe instead of -e

y/0/ /;$_<${[sort@a]}[-1]&&y/1/0/for@a=split/\b/;$_=join"",@a;y; ;0

Expects and prints a string (concatenation) of 0s and 1s.

deleted 1 character in body
Source Link
msh210
  • 3.5k
  • 21
  • 36

#Perl 5, 6968 bytes

6867, plus 1 for -pe instead of -e

y/0/ /;$_<${[sort@a]}[-1]&&y/1/0/for@a=split/\b/;$_=join"",@a;y/@a;y; /0/;0

Expects and prints a string (concatenation) of 0s and 1s.

#Perl 5, 69 bytes

68, plus 1 for -pe instead of -e

y/0/ /;$_<${[sort@a]}[-1]&&y/1/0/for@a=split/\b/;$_=join"",@a;y/ /0/

#Perl 5, 68 bytes

67, plus 1 for -pe instead of -e

y/0/ /;$_<${[sort@a]}[-1]&&y/1/0/for@a=split/\b/;$_=join"",@a;y; ;0

Expects and prints a string (concatenation) of 0s and 1s.

Source Link
msh210
  • 3.5k
  • 21
  • 36

#Perl 5, 69 bytes

68, plus 1 for -pe instead of -e

y/0/ /;$_<${[sort@a]}[-1]&&y/1/0/for@a=split/\b/;$_=join"",@a;y/ /0/