Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Perl 5 (-n), (削除) 41 (削除ここまで) 40 bytes

Perl 5 (-n), (削除) 41 (削除ここまで) 40 bytes

-1 byte thanls to Xcali

map{/01.*1/||say oct}glob"0b"."{0,1}"x$_

TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • "0b". : concatenate to "0b"
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct : to convert to decimal and say

#Perl 5 (-n), (削除) 41 (削除ここまで) 40 bytes

-1 byte thanls to Xcali

map{/01.*1/||say oct}glob"0b"."{0,1}"x$_

TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • "0b". : concatenate to "0b"
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct : to convert to decimal and say

Perl 5 (-n), (削除) 41 (削除ここまで) 40 bytes

-1 byte thanls to Xcali

map{/01.*1/||say oct}glob"0b"."{0,1}"x$_

TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • "0b". : concatenate to "0b"
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct : to convert to decimal and say
added 37 characters in body
Source Link
Nahuel Fouilleul
  • 8.7k
  • 1
  • 11
  • 19

#Perl 5 (-n), 41(削除) 41 (削除ここまで) 40 bytes

-1 byte thanls to Xcali

map{/01.*1/||say oct"0b$_"oct}glob"glob"0b"."{0,1}"x$_

TIO TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • "0b". : concatenate to "0b"
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct"0b$_"oct : to convert to decimal and say

#Perl 5 (-n), 41 bytes

map{/01.*1/||say oct"0b$_"}glob"{0,1}"x$_

TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct"0b$_" : to convert to decimal and say

#Perl 5 (-n), (削除) 41 (削除ここまで) 40 bytes

-1 byte thanls to Xcali

map{/01.*1/||say oct}glob"0b"."{0,1}"x$_

TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • "0b". : concatenate to "0b"
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct : to convert to decimal and say
deleted 2 characters in body
Source Link
Nahuel Fouilleul
  • 8.7k
  • 1
  • 11
  • 19

#Perl 5 (-n), 41 bytes

map{/01.*1/||say oct"0b$_"}glob"{0,1}"x$_

TIO TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct"0b$_" : to convert to decimal and say

#Perl 5 (-n), 41 bytes

map{/01.*1/||say oct"0b$_"}glob"{0,1}"x$_

TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct"0b$_" : to convert to decimal and say

#Perl 5 (-n), 41 bytes

map{/01.*1/||say oct"0b$_"}glob"{0,1}"x$_

TIO

  • "{0,1}"x$_ : the string "{0,1}" repeated n times
  • glob : glob expansion (cartesian product)
  • map{...} : for each element
  • /01.*1/|| : to skip when 01 followed by something then 1
  • say oct"0b$_" : to convert to decimal and say
added 260 characters in body
Source Link
Nahuel Fouilleul
  • 8.7k
  • 1
  • 11
  • 19
Loading
Source Link
Nahuel Fouilleul
  • 8.7k
  • 1
  • 11
  • 19
Loading

AltStyle によって変換されたページ (->オリジナル) /