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 6, (削除) 21 20 (削除ここまで) 18 bytes

Thanks to Brad Gilbert b2gills for -2 bytes

{.[$++*17%$_]xx$_}

Try it online!

Yet another port of G B's answer. (削除) Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid. (削除ここまで) However, $ is reset.

###Explanation:

Explanation:

{ } #Anonymous code block
 xx$_ #Repeat size of inputted array (54) times
 .[ ] #Get from the inputted array, the value at index
 $++*17%$_ #The incremented variable, multiplied by 17, modded by size of the array

Perl 6, (削除) 21 20 (削除ここまで) 18 bytes

Thanks to Brad Gilbert b2gills for -2 bytes

{.[$++*17%$_]xx$_}

Try it online!

Yet another port of G B's answer. (削除) Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid. (削除ここまで) However, $ is reset.

###Explanation:

{ } #Anonymous code block
 xx$_ #Repeat size of inputted array (54) times
 .[ ] #Get from the inputted array, the value at index
 $++*17%$_ #The incremented variable, multiplied by 17, modded by size of the array

Perl 6, (削除) 21 20 (削除ここまで) 18 bytes

Thanks to Brad Gilbert b2gills for -2 bytes

{.[$++*17%$_]xx$_}

Try it online!

Yet another port of G B's answer. (削除) Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid. (削除ここまで) However, $ is reset.

Explanation:

{ } #Anonymous code block
 xx$_ #Repeat size of inputted array (54) times
 .[ ] #Get from the inputted array, the value at index
 $++*17%$_ #The incremented variable, multiplied by 17, modded by size of the array
-2 bytes
Source Link
Jo King
  • 48.1k
  • 6
  • 130
  • 187

Perl 6, (削除) 21 20 (削除ここまで) 2018 bytes

Thanks to Brad Gilbert b2gills for -2 bytes

{@_[$!++*17%@_]xx@_.[$++*17%$_]xx$_}

Try it online! Try it online!

Yet another port of G B's answer. Note that(削除) Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid. (削除ここまで) However, while the global variable $! is notis reset between functions, the value doesn't matter, since any order of the output is valid.

###Explanation:

{ } #Anonymous code block
 xx@_xx$_ #Repeat size of inputted array (54) times
 @_[ .[ ] #Get from the inputted array, the value at index
 $!++*17%@_ $++*17%$_ #The incremented variable, multiplied by 17, modded by size of the array

Perl 6, (削除) 21 (削除ここまで) 20 bytes

{@_[$!++*17%@_]xx@_}

Try it online!

Yet another port of G B's answer. Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid.

###Explanation:

{ } #Anonymous code block
 xx@_ #Repeat size of inputted array (54) times
 @_[ ] #Get from the inputted array, the value at index
 $!++*17%@_  #The incremented variable, multiplied by 17, modded by size of the array

Perl 6, (削除) 21 20 (削除ここまで) 18 bytes

Thanks to Brad Gilbert b2gills for -2 bytes

{.[$++*17%$_]xx$_}

Try it online!

Yet another port of G B's answer. (削除) Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid. (削除ここまで) However, $ is reset.

###Explanation:

{ } #Anonymous code block
 xx$_ #Repeat size of inputted array (54) times
 .[ ] #Get from the inputted array, the value at index
 $++*17%$_ #The incremented variable, multiplied by 17, modded by size of the array
-1 byte
Source Link
Jo King
  • 48.1k
  • 6
  • 130
  • 187

Perl 6, 21(削除) 21 (削除ここまで) 20 bytes

{@_[$!++*17%54]xx 54++*17%@_]xx@_}

Try it online! Try it online!

Yet another port of G B's answer. Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid.

###Explanation:

{ } #Anonymous functioncode block
 xxxx@_ 54 #Repeat size #Repeatof inputted array (54) times
 @_[ ] #Get from the inputted array, the indexvalue ofat index
 $!++*17%54 ++*17%@_ #The incremented variable, multiplied by 17, modded by 54size of the array

Perl 6, 21 bytes

{@_[$!++*17%54]xx 54}

Try it online!

Yet another port of G B's answer. Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid.

###Explanation:

{ } #Anonymous function block
 xx 54 #Repeat 54 times
 @_[ ] #Get from the inputted array, the index of
 $!++*17%54  #The incremented variable, multiplied by 17, modded by 54

Perl 6, (削除) 21 (削除ここまで) 20 bytes

{@_[$!++*17%@_]xx@_}

Try it online!

Yet another port of G B's answer. Note that, while the global variable $! is not reset between functions, the value doesn't matter, since any order of the output is valid.

###Explanation:

{ } #Anonymous code block
 xx@_ #Repeat size of inputted array (54) times
 @_[ ] #Get from the inputted array, the value at index
 $!++*17%@_ #The incremented variable, multiplied by 17, modded by size of the array
added 5 characters in body
Source Link
Jo King
  • 48.1k
  • 6
  • 130
  • 187
Loading
Source Link
Jo King
  • 48.1k
  • 6
  • 130
  • 187
Loading

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