#K78467. Double Characters
Double Characters
Double Characters
Given a string S, your task is to create a new string where each character of S is repeated twice consecutively. For example, if S = abcd, the output should be aabbccdd. This problem tests basic string manipulation skills and is ideal for beginners. Use loops or built-in functions to achieve the result.
Mathematically, if S = s₁s₂...sₙ then the output should be s₁s₁s₂s₂...sₙsₙ.
inputFormat
The input consists of a single line containing the string S. The length of S is between 1 and 1000 characters.
outputFormat
Output the transformed string where each character in S is duplicated consecutively.## sample
abcd
aabbccdd