Skip to main content
Notice removed Reward existing answer by xnor
Bounty Ended with lynn's answer chosen by xnor
Notice added Reward existing answer by xnor
Bounty Started worth 150 reputation by xnor
Loosened input requirements to default as many users are already assuming default and OP has given permission to make this change.
Source Link
Wheat Wizard
  • 100k
  • 22
  • 282
  • 661

Requirements:

  • Take a single word as input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria:
Standard code golf. Shortest number of bytes in program wins.

Clarification:
For languages with 1-based indexing the output must still match the above, aabccdee is not an acceptable solution.

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria:
Standard code golf. Shortest number of bytes in program wins.

Clarification:
For languages with 1-based indexing the output must still match the above, aabccdee is not an acceptable solution.

Requirements:

  • Take a single word as input with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria:
Standard code golf. Shortest number of bytes in program wins.

Clarification:
For languages with 1-based indexing the output must still match the above, aabccdee is not an acceptable solution.

Became Hot Network Question
added 137 characters in body
Source Link
Taako
  • 569
  • 4
  • 9

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria:Winning Criteria:
Standard code golf. Shortest number of bytes in program wins.

Clarification:
For languages with 1-based indexing the output must still match the above, aabccdee is not an acceptable solution.

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria: Standard code golf. Shortest number of bytes in program wins.

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria:
Standard code golf. Shortest number of bytes in program wins.

Clarification:
For languages with 1-based indexing the output must still match the above, aabccdee is not an acceptable solution.

added 32 characters in body; edited title
Source Link
Taako
  • 569
  • 4
  • 9

Repeat odd index charactersevery other character in string starting with second character

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every odd index character (starting from 0 as firstother character) is repeated once, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria: Standard code golf. Shortest number of bytes in program wins.

Repeat odd index characters

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every odd index character (starting from 0 as first character) is repeated once

Example:

Input: abcde

Output: abbcdde

Winning Criteria: Standard code golf. Shortest number of bytes in program wins.

Repeat every other character in string starting with second character

Requirements:

  • Take a single word input on stdin with only lowercase alphabetical characters (a-z)
  • Output a string where every other character is repeated, with the first repeated character being the second character in the string

Example:

Input: abcde

Output: abbcdde

Winning Criteria: Standard code golf. Shortest number of bytes in program wins.

Tweeted twitter.com/StackCodeGolf/status/1223395609018847235
edited tags
Link
FryAmTheEggman
  • 17.5k
  • 3
  • 40
  • 97
Loading
Source Link
Taako
  • 569
  • 4
  • 9
Loading