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 28 characters in body
Source Link
kalsowerus
  • 2k
  • 11
  • 17

05AB1E, 8(削除) 8 (削除ここまで) 7 bytes

-1 byte thanks to @Emigna

×ばつì}J×ばつì?

Try it online! Try it online!

Explanation

×ばつì}J×ばつì? Arguments s, n ("Hello, World!", 3)
ô Split s into pieces of n (["Hel", "lo,", ...])
 εʒ } ApplyFilter each(used as foreach)
 ć Extract head ("Hel" -> "el", "H" ...)
 ×ばつì Repeat n times and prepend ("el", "H" -> "HHHel" ...)
 J? Join stack  ("HHHellllo, Print without Worrrld!!!")newline

05AB1E, 8 bytes

×ばつì}J

Try it online!

Explanation

×ばつì}J Arguments s, n ("Hello, World!", 3)
ô Split s into pieces of n (["Hel", "lo,", ...])
 ε } Apply each
 ć Extract head ("Hel" -> "el", "H" ...)
 ×ばつì Repeat n times and prepend ("el", "H" -> "HHHel" ...)
 J Join stack  ("HHHellllo, Worrrld!!!")

05AB1E, (削除) 8 (削除ここまで) 7 bytes

-1 byte thanks to @Emigna

×ばつì?

Try it online!

Explanation

×ばつì? Arguments s, n ("Hello, World!", 3)
ô Split s into pieces of n (["Hel", "lo,", ...])
 ʒ Filter (used as foreach)
 ć Extract head ("Hel" -> "el", "H" ...)
 ×ばつì Repeat n times and prepend ("el", "H" -> "HHHel" ...)
 ? Print without newline
added 4 characters in body
Source Link
kalsowerus
  • 2k
  • 11
  • 17

05AB1E, 8 bytes

×ばつì}J

Try it online!

Explanation

×ばつì}J Arguments s, n ("Hello, World!", 3)
ô Split s into pieces of n (["Hel", "lo,", ...])
 ε } Apply each
 ć Extract head ("Hel" -> "el", "H" ...)
 ×ばつì Repeat n times and prepend ("el", "H" -> "HHHel" ...)
 J Join stack ("HHHellllo, Worrrld!!!")

05AB1E, 8 bytes

×ばつì}J

Try it online!

Explanation

×ばつì}J Arguments s, n ("Hello, World!", 3)
ô Split s into pieces of n (["Hel", "lo,", ...])
 ε } Apply each
 ć Extract head ("Hel" -> "el", "H" ...)
 ×ばつì Repeat n times and prepend ("el", "H" -> "HHHel" ...)
 J Join stack ("HHHellllo, Worrrld!!!")

05AB1E, 8 bytes

×ばつì}J

Try it online!

Explanation

×ばつì}J Arguments s, n ("Hello, World!", 3)
ô Split s into pieces of n (["Hel", "lo,", ...])
 ε } Apply each
 ć Extract head ("Hel" -> "el", "H" ...)
 ×ばつì Repeat n times and prepend ("el", "H" -> "HHHel" ...)
 J Join stack ("HHHellllo, Worrrld!!!")
Source Link
kalsowerus
  • 2k
  • 11
  • 17

05AB1E, 8 bytes

×ばつì}J

Try it online!

Explanation

×ばつì}J Arguments s, n ("Hello, World!", 3)
ô Split s into pieces of n (["Hel", "lo,", ...])
 ε } Apply each
 ć Extract head ("Hel" -> "el", "H" ...)
 ×ばつì Repeat n times and prepend ("el", "H" -> "HHHel" ...)
 J Join stack ("HHHellllo, Worrrld!!!")

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