Skip to content

Instantly share code, notes, and snippets.

@feynon
Created October 31, 2018 07:07
Show Gist options
  • Save feynon/29b12d904df6f3e652e830bb1dc6b850 to your computer and use it in GitHub Desktop.
Save feynon/29b12d904df6f3e652e830bb1dc6b850 to your computer and use it in GitHub Desktop.
/*
Input:
4
your
progress
is
noticeable
Output:
y
po
i
ntc
*/
#include <iostream>
#include <string.h>
using namespace std;
int main()
{
int n,k,i=0;
cin >> n;
while(n--)
{
string s;
cin >> s;
k=s.length()/2;
while(i<k)
{
cout << s[i];
i=i+2;
}
cout << endl;
i=0;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment