You are viewing a single comment's thread. Return to all comments →
Heres my rather simple c++ solution
int main() { int x; cin >> x; for(int i = 0; i < x; i++){ string s; string s1, s2; cin >> s; for(int j=0; j < s.size(); j++){ if(j%2==0){ s1 += s[j]; }else{ s2+= s[j]; } } cout << s1 << " " << s2 << endl; } return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: Let's Review
You are viewing a single comment's thread. Return to all comments →
Heres my rather simple c++ solution