#K92802. Every Other Character
Every Other Character
Every Other Character
You are given a non-empty string (s). Your task is to output a new string that consists of every other character from (s), starting with the first character. For example, if the input is abcdef
, the expected output is ace
.
Make sure that your solution reads from standard input (stdin) and writes to standard output (stdout).
inputFormat
A single line containing the string (s). The string can include letters, digits, and special characters. Its length is in the range (0 \leq |s| \leq 10^5).
outputFormat
A single line containing the resulting string formed by taking every other character from (s), starting with the first character.## sample
abcdef
ace