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

added 326 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions (Thanks Magic Octopus Urn and Kevin Cruijssen for somemost of these)

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space
ðs∍ # Push ' ', swap, make the string of spaces as long as the input was
võJ # For each char, push a space and ''.join(stack)
v¶J # For each char, push a newline and ''.join(stack)
€ðJ # For each char, push a space. Then ''.join(stack)
€¶J # For each char, push a newline. Then ''.join(stack)

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions (Thanks Magic Octopus Urn for some of these)

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space
ðs∍ # Push ' ', swap, make the string of spaces as long as the input was

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions (Thanks Magic Octopus Urn and Kevin Cruijssen for most of these)

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space
ðs∍ # Push ' ', swap, make the string of spaces as long as the input was
võJ # For each char, push a space and ''.join(stack)
v¶J # For each char, push a newline and ''.join(stack)
€ðJ # For each char, push a space. Then ''.join(stack)
€¶J # For each char, push a newline. Then ''.join(stack)
added 78 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions (Thanks Magic Octopus Urn for some of these)

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space
ðs∍ # Push ' ', swap, make the string of spaces as long as the input was

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions (Thanks Magic Octopus Urn for some of these)

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space
ðs∍ # Push ' ', swap, make the string of spaces as long as the input was
added 72 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline

05AB1E, 3 bytes

vð?

Try it online!

v # For each character...
 ð? # Output a space without a newline

Other 3 byte solutions

v¶? # For each character print a newline (without adding a newline)
võ, # For each character print the empty string with a newline
g×ばつ # Get the length, concatenate that many copies of space
g×ばつ # Get the length, concatenate that many copies of newline
Sð: # Split, push a space, replace each char in input with a space
added 132 characters in body
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53
Loading
Source Link
Riley
  • 11.7k
  • 2
  • 23
  • 53
Loading

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