-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path42.cpp
More file actions
32 lines (29 loc) · 670 Bytes
/
42.cpp
File metadata and controls
32 lines (29 loc) · 670 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <cmath>
#include <cstdio>
#include <vector>
#include <iostream>
#include <algorithm>
using namespace std;
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */
int n;
cin>>n;
while(n--)
{
string s;
cin>>s;
// cout<<s.length();
for (int i=0;i<s.length();i++)
{
if(i%2==0)
cout<<s[i];
}
cout<<" ";
for (int i=0;i<s.length();i++)
{
if(i%2!=0)
cout<<s[i];
}
}
return 0;
}