Skip to main content
Notice removed Reward existing answer by Adám
Bounty Ended with Seggan's answer chosen by Adám
Notice added Reward existing answer by Adám
Bounty Started worth 200 reputation by Adám
Fix typo in challenge title
Link
mbomb007
  • 23.5k
  • 7
  • 63
  • 135

!I!n!s!e!r!t! !i!n!b!e!t!w!e!e!n!

Tweeted twitter.com/StackCodeGolf/status/1163465758401355780
Became Hot Network Question
added 97 characters in body
Source Link
user85052
user85052

Posted from here.

This challenge is highly "distilled" from this question. Special thanks to @Akababa!

In this task, you should insert an exclamation mark at the start of the string and after every character.

Rules

  • There will always be a non-empty-string input. The input will not contain tabs either. You can assume that the input only contain non-extended ASCII printable characters and newlines.
  • The input will not contain trailing newlines as long as your language can't detect a newline.
  • This is a contest; the shortest answer should win.

Examples

  • 4 newlines result in 5 newline-delimited exclamation marks. It is very hard to put this as a Markdown text, so this is stated instead.
1 2 3 4 5 6
129591 129012 129127 129582

0

Outputs

!1! !2! !3! !4! !5! !6!
!1!2!9!5!9!1! !1!2!9!0!1!2! !1!2!9!1!2!7! !1!2!9!5!8!2!
!
!0!
asd afjoK ak:e
kPrLd
    fOJOE;
    KFO
KFkepjgop sgpaoj   faj

Outputs

!a!s!d! !a!f!j!o!K! !a!k!:!e!
!k!P!r!L!d!
! ! ! ! !f!O!J!O!E!;!
! ! ! ! !K!F!O!
!K!F!k!e!p!j!g!o!p! !s!g!p!a!o!j! ! ! !f!a!j!

A base test case with only one character:

a

Outputs

!a!

(Auto-completion! Just kidding, there is no such thing.) Contains exclamation marks:

!!
!!
!!
!!
!!

Outputs:

!!!!!
!!!!!
!!!!!
!!!!!
!!!!!

Posted from here.

This challenge is highly "distilled" from this question. Special thanks to @Akababa!

In this task, you should insert an exclamation mark at the start of the string and after every character.

Rules

  • There will always be a non-empty-string input. The input will not contain tabs either. You can assume that the input only contain non-extended ASCII printable characters and newlines.
  • This is a contest; the shortest answer should win.

Examples

  • 4 newlines result in 5 newline-delimited exclamation marks. It is very hard to put this as a Markdown text, so this is stated instead.
1 2 3 4 5 6
129591 129012 129127 129582

0

Outputs

!1! !2! !3! !4! !5! !6!
!1!2!9!5!9!1! !1!2!9!0!1!2! !1!2!9!1!2!7! !1!2!9!5!8!2!
!
!0!
asd afjoK ak:e
kPrLd
    fOJOE;
    KFO
KFkepjgop sgpaoj   faj

Outputs

!a!s!d! !a!f!j!o!K! !a!k!:!e!
!k!P!r!L!d!
! ! ! ! !f!O!J!O!E!;!
! ! ! ! !K!F!O!
!K!F!k!e!p!j!g!o!p! !s!g!p!a!o!j! ! ! !f!a!j!

A base test case with only one character:

a

Outputs

!a!

(Auto-completion! Just kidding, there is no such thing.) Contains exclamation marks:

!!
!!
!!
!!
!!

Outputs:

!!!!!
!!!!!
!!!!!
!!!!!
!!!!!

Posted from here.

This challenge is highly "distilled" from this question. Special thanks to @Akababa!

In this task, you should insert an exclamation mark at the start of the string and after every character.

Rules

  • There will always be a non-empty-string input. The input will not contain tabs either. You can assume that the input only contain non-extended ASCII printable characters and newlines.
  • The input will not contain trailing newlines as long as your language can't detect a newline.
  • This is a contest; the shortest answer should win.

Examples

  • 4 newlines result in 5 newline-delimited exclamation marks. It is very hard to put this as a Markdown text, so this is stated instead.
1 2 3 4 5 6
129591 129012 129127 129582

0

Outputs

!1! !2! !3! !4! !5! !6!
!1!2!9!5!9!1! !1!2!9!0!1!2! !1!2!9!1!2!7! !1!2!9!5!8!2!
!
!0!
asd afjoK ak:e
kPrLd
    fOJOE;
    KFO
KFkepjgop sgpaoj   faj

Outputs

!a!s!d! !a!f!j!o!K! !a!k!:!e!
!k!P!r!L!d!
! ! ! ! !f!O!J!O!E!;!
! ! ! ! !K!F!O!
!K!F!k!e!p!j!g!o!p! !s!g!p!a!o!j! ! ! !f!a!j!

A base test case with only one character:

a

Outputs

!a!

(Auto-completion! Just kidding, there is no such thing.) Contains exclamation marks:

!!
!!
!!
!!
!!

Outputs:

!!!!!
!!!!!
!!!!!
!!!!!
!!!!!
Source Link
user85052
user85052
Loading