Skip to main content
1 of 6
daavko
  • 844
  • 6
  • 11

Retina, 44 bytes

^\d+ (.+)
$0$*'$1
+`'([^']).(.+)?.(.)
$1$2$3

Assumes input in following format: {number of repeats} {string}
The space between number of repeats and string is significant.

Try it online!

daavko
  • 844
  • 6
  • 11