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

#Dyalog APL , (削除) 31 (削除ここまで)(削除) 25 (削除ここまで) 23 bytes

Dyalog APL , (削除) 31 (削除ここまで)(削除) 25 (削除ここまで) 23 bytes

Requires ⎕IO←0, which is default on many systems.

↑(∊1, ̈0⍴ ×ばつ⍳26)⊂676⍴⎕A

676⍴⎕A cycle the letters to get 676 of them

(...)⊂ split on ones in

⍳26 zero through 25; {0, 1, 2, 3, ..., 25}

×ばつ multiply them by 2, {0, 2, 4, 6, ..., 50}

0⍴ ̈⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.

1, ̈ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.

flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}

stack the strings

TryAPL online!

-6 thanks to @jimmy23013

#Dyalog APL , (削除) 31 (削除ここまで)(削除) 25 (削除ここまで) 23 bytes

Requires ⎕IO←0, which is default on many systems.

↑(∊1, ̈0⍴ ×ばつ⍳26)⊂676⍴⎕A

676⍴⎕A cycle the letters to get 676 of them

(...)⊂ split on ones in

⍳26 zero through 25; {0, 1, 2, 3, ..., 25}

×ばつ multiply them by 2, {0, 2, 4, 6, ..., 50}

0⍴ ̈⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.

1, ̈ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.

flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}

stack the strings

TryAPL online!

-6 thanks to @jimmy23013

Dyalog APL , (削除) 31 (削除ここまで)(削除) 25 (削除ここまで) 23 bytes

Requires ⎕IO←0, which is default on many systems.

↑(∊1, ̈0⍴ ×ばつ⍳26)⊂676⍴⎕A

676⍴⎕A cycle the letters to get 676 of them

(...)⊂ split on ones in

⍳26 zero through 25; {0, 1, 2, 3, ..., 25}

×ばつ multiply them by 2, {0, 2, 4, 6, ..., 50}

0⍴ ̈⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.

1, ̈ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.

flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}

stack the strings

TryAPL online!

-6 thanks to @jimmy23013

-2 and explanation
Source Link
Adám
  • 31.8k
  • 4
  • 131
  • 292

#Dyalog APL, (削除) 31 (削除ここまで) 25(削除) 25 (削除ここまで) 23 bytes

Requires ⎕IO←0, which is default on many systems.

↑(∊1,1, ̈0⍴ ×ばつ⍳25 ̈0⍴ ×ばつ⍳26)⊂676⍴⎕A

TryAPL online! 676⍴⎕A cycle the letters to get 676 of them

(...)⊂ split on ones in

⍳26 zero through 25; {0, 1, 2, 3, ..., 25}

×ばつ multiply them by 2, {0, 2, 4, 6, ..., 50}

0⍴ ̈⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.

1, ̈ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.

flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}

stack the strings

TryAPL online!

-6 thanks to @jimmy23013

#Dyalog APL, (削除) 31 (削除ここまで) 25 bytes

↑(∊1,1, ̈0⍴ ×ばつ⍳25)⊂676⍴⎕A

TryAPL online!

-6 thanks to @jimmy23013

#Dyalog APL, (削除) 31 (削除ここまで) (削除) 25 (削除ここまで) 23 bytes

Requires ⎕IO←0, which is default on many systems.

↑(∊1, ̈0⍴ ×ばつ⍳26)⊂676⍴⎕A

676⍴⎕A cycle the letters to get 676 of them

(...)⊂ split on ones in

⍳26 zero through 25; {0, 1, 2, 3, ..., 25}

×ばつ multiply them by 2, {0, 2, 4, 6, ..., 50}

0⍴ ̈⍨ generate zero-sequences of such lengths; {}, {0}, {0, 0}, etc.

1, ̈ prepend one to each sequence; {1}, {1, 0}, {1, 0, 0}, etc.

flatten; {1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 1, ..., 0}

stack the strings

TryAPL online!

-6 thanks to @jimmy23013

-6
Source Link
Adám
  • 31.8k
  • 4
  • 131
  • 292

#Dyalog APL, 31 (削除) 31 (削除ここまで) 25 bytes

((⍳n)∊1,1++\ ×ばつ⍳n1, ̈0⍴ ×ばつ⍳25)⊂⎕A⍴⍨n←676⊂676⍴⎕A

TryAPL online! TryAPL online!

-6 thanks to @jimmy23013

#Dyalog APL, 31 bytes

((⍳n)∊1,1++\ ×ばつ⍳n)⊂⎕A⍴⍨n←676

TryAPL online!

#Dyalog APL, (削除) 31 (削除ここまで) 25 bytes

↑(∊1,1, ̈0⍴ ×ばつ⍳25)⊂676⍴⎕A

TryAPL online!

-6 thanks to @jimmy23013

Source Link
Adám
  • 31.8k
  • 4
  • 131
  • 292
Loading

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