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

#Japt , (削除) 33 (削除ここまで)(削除) 32 (削除ここまで)(削除) 27 (削除ここまで) 25 bytes

Japt , (削除) 33 (削除ここまで)(削除) 32 (削除ここまで)(削除) 27 (削除ここまで) 25 bytes

SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

###Ungolfed and explanation

Ungolfed and explanation

SpW-1 +Q p-~U*V/W f'.pU)·qR
 // Implicit: U = width, V = height, W = interval
SpW-1 +Q // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W // Repeat this string ceil(U*V/W) times.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Suggestions welcome!

#Japt , (削除) 33 (削除ここまで)(削除) 32 (削除ここまで)(削除) 27 (削除ここまで) 25 bytes

SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

###Ungolfed and explanation

SpW-1 +Q p-~U*V/W f'.pU)·qR
 // Implicit: U = width, V = height, W = interval
SpW-1 +Q // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W // Repeat this string ceil(U*V/W) times.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Suggestions welcome!

Japt , (削除) 33 (削除ここまで)(削除) 32 (削除ここまで)(削除) 27 (削除ここまで) 25 bytes

SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

Ungolfed and explanation

SpW-1 +Q p-~U*V/W f'.pU)·qR
 // Implicit: U = width, V = height, W = interval
SpW-1 +Q // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W // Repeat this string ceil(U*V/W) times.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Suggestions welcome!

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

#Japt, (削除) 33 (削除ここまで) (削除) 32 (削除ここまで) (削除) 27 (削除ここまで) 25 bytes

SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online! Try it online!

###Ungolfed and explanation

SpW-1 +Q p-~U*V/W f'.pU)·qR
 // Implicit: U = width, V = height, W = interval
SpW-1 +Q // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W // Repeat this string ceil(U*V/W) times.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Suggestions welcome!

#Japt, (削除) 33 (削除ここまで) (削除) 32 (削除ここまで) (削除) 27 (削除ここまで) 25 bytes

SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

###Ungolfed and explanation

SpW-1 +Q p-~U*V/W f'.pU)·qR
 // Implicit: U = width, V = height, W = interval
SpW-1 +Q // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W // Repeat this string ceil(U*V/W) times.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Suggestions welcome!

#Japt, (削除) 33 (削除ここまで) (削除) 32 (削除ここまで) (削除) 27 (削除ここまで) 25 bytes

SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

###Ungolfed and explanation

SpW-1 +Q p-~U*V/W f'.pU)·qR
 // Implicit: U = width, V = height, W = interval
SpW-1 +Q // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W // Repeat this string ceil(U*V/W) times.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Suggestions welcome!

golfed 2 bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

#Japt, (削除) 33 (削除ここまで) (削除) 32 (削除ここまで) 27(削除) 27 (削除ここまで) 25 bytes

SpU*V £Y%W\WSpW-1?Q:X} +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

###Ungolfed and explanation

SpU*V mXYZ{Y%W==WSpW-1?Q:X} +Q p-~U*V/W f'.pU)qR·qR
 // Implicit: U = width, V = height, W = interval
SpU*V SpW-1 +Q // Create a string of U*V spaces.
mXYZ{ // Map each item X andW its- index1 Yspaces, inplus thisa stringquotation to:mark.
Y%W==Wp-1? /~U*V/ If Y % W equals W - 1,
Q:X // aRepeat quotationthis mark;string otherwise,ceil(U*V/W) Xtimes.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Two alternative 32-byte solutions:

A=SpU*V;0oU*VW £A=AhXQ};Af'.pU)·
Sp°U*V £Y%U ́\U°?°T©R:Y%W\T%W?Q:X

Suggestions welcome!

#Japt, (削除) 33 (削除ここまで) (削除) 32 (削除ここまで) 27 bytes

SpU*V £Y%W\W-1?Q:X} f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

###Ungolfed and explanation

SpU*V mXYZ{Y%W==W-1?Q:X} f'.pU)qR
 // Implicit: U = width, V = height, W = interval
SpU*V  // Create a string of U*V spaces.
mXYZ{ // Map each item X and its index Y in this string to:
Y%W==W-1? // If Y % W equals W - 1,
Q:X // a quotation mark; otherwise, X.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Two alternative 32-byte solutions:

A=SpU*V;0oU*VW £A=AhXQ};Af'.pU)·
Sp°U*V £Y%U ́\U°?°T©R:Y%W\T%W?Q:X

Suggestions welcome!

#Japt, (削除) 33 (削除ここまで) (削除) 32 (削除ここまで) (削除) 27 (削除ここまで) 25 bytes

SpW-1 +Q p-~U*V/W f'.pU)·

Takes input in format W H N. Uses and " in place of . and X, respectively. Try it online!

###Ungolfed and explanation

SpW-1 +Q p-~U*V/W f'.pU)·qR
 // Implicit: U = width, V = height, W = interval
SpW-1 +Q // Create a string of W - 1 spaces, plus a quotation mark.
p-~U*V/W // Repeat this string ceil(U*V/W) times.
f'.pU) // Split the resulting string into groups of U characters.
qR // Join with newlines.
 // Implicit: output last expression

Suggestions welcome!

golfed 5 bytes
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
added third version
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
added alternate version
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241
Loading

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