package
0.0.0-20241209194135-874399dce24d
Repository: https://github.com/snipersap/goprojects.git
Documentation: pkg.go.dev

# README

Hackerrank challenge Day 5: Loops

Objective

Today we will expand our knowledge of strings, combining it with what we have already learned about loops. Check out the Tutorial tab for learning materials and an instructional video.

Task

Given a string, S , of length N that is indexed from 0 to N-1, print its even-indexed and odd-indexed characters as space-separated strings on a single line (see the Sample below for more detail).

Note: 0 is considered to be an even index.

Example

s = abdecf
Print abc def

Input Format

The first line contains an integer, T (the number of test cases). Each line i of the T subsequent lines contain a string, S.

Constraints

1 <= T <= 10
2 <= length of S <= 10000

Output Format

For each String S j (where ), print Sj's even-indexed characters, followed by a space, followed by Sj's odd-indexed characters.

Sample Input

2
Hacker
Rank

Sample Output

Hce akr
Rn ak

Test Result

2
Hacker
Rank
Hce akr
Rn ak