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

Golfed 1 byte
Source Link
DLosc
  • 40.7k
  • 6
  • 87
  • 142

Jelly, 17(削除) 17 (削除ここまで) 16 bytes

6ẋ8)*¶9μ+þ<5ŒBa6Y6ẋ8)*¶9μ>þa6UŒBY

Try it online! Try it online!

This is my first time golfing in Jelly; I'm sure this could be golfed by 3 bytes at leastfurther. Advice welcome. :^)

Explanation

6ẋ8)*¶9μ+þ<5ŒBa6Y
6 Space character
 ẋ8 Repeated 8 times
 Since this niladic chain doesn't connect to anything, just output it
 )*¶ Two-character string containing * and newline
 Since this niladic chain doesn't connect to anything, just output it
 9μ Apply the following monadic chain to a starting value of 9:
  Make ana addition9x9 table of [1, 2, ...,where 9]each withentry itself
is 1 if the column number is
 <5 Replace each element with 1 if it's lessgreater than 10the row number, 0 otherwise
if not
 a6 ŒB Bounce,Logical mirroringAND eachwith linespace to(replaces the right1's with spaces)
 U a6 LogicalReverse ANDeach withrow
 space (replaces the 1's with spaces)
 ŒB Bounce, mirroring each row to the right
 Y Join with newlines

Jelly, 17 bytes

6ẋ8)*¶9μ+þ<5ŒBa6Y

Try it online!

This is my first time golfing in Jelly; I'm sure this could be golfed by 3 bytes at least. Advice welcome. :^)

Explanation

6ẋ8)*¶9μ+þ<5ŒBa6Y
6 Space character
 ẋ8 Repeated 8 times
 Since this niladic chain doesn't connect to anything, just output it
 )*¶ Two-character string containing * and newline
 Since this niladic chain doesn't connect to anything, just output it
 9μ Apply the following monadic chain to a starting value of 9:
  Make an addition table of [1, 2, ..., 9] with itself
 <5 Replace each element with 1 if it's less than 10, 0 otherwise
 ŒB Bounce, mirroring each line to the right
 a6 Logical AND with space (replaces the 1's with spaces)
 Y Join with newlines

Jelly, (削除) 17 (削除ここまで) 16 bytes

6ẋ8)*¶9μ>þa6UŒBY

Try it online!

This is my first time golfing in Jelly; I'm sure this could be golfed further. Advice welcome. :^)

Explanation

6 Space character
 ẋ8 Repeated 8 times
 Since this niladic chain doesn't connect to anything, just output it
 )*¶ Two-character string containing * and newline
 Since this niladic chain doesn't connect to anything, just output it
 9μ Apply the following monadic chain to a starting value of 9:
  Make a 9x9 table, where each entry is 1 if the column number is
 greater than the row number, 0 if not
 a6 Logical AND with space (replaces the 1's with spaces)
 U Reverse each row
 ŒB Bounce, mirroring each row to the right
 Y Join with newlines
Source Link
DLosc
  • 40.7k
  • 6
  • 87
  • 142

Jelly, 17 bytes

6ẋ8)*¶9μ+þ<5ŒBa6Y

Try it online!

This is my first time golfing in Jelly; I'm sure this could be golfed by 3 bytes at least. Advice welcome. :^)

Explanation

6ẋ8)*¶9μ+þ<5ŒBa6Y
6 Space character
 ẋ8 Repeated 8 times
 Since this niladic chain doesn't connect to anything, just output it
 )*¶ Two-character string containing * and newline
 Since this niladic chain doesn't connect to anything, just output it
 9μ Apply the following monadic chain to a starting value of 9:
 +þ Make an addition table of [1, 2, ..., 9] with itself
 <5 Replace each element with 1 if it's less than 10, 0 otherwise
 ŒB Bounce, mirroring each line to the right
 a6 Logical AND with space (replaces the 1's with spaces)
 Y Join with newlines

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