//Language used: C++
#include
using namespace std;
#include
int main()
{
int a;
cin>>a;
char arr[100][100];
for(int i=0; i<a; ++i)
cin>>arr[i];
for(int i=0;i<a;++i)
{for(int j=0;j<strlen(arr[i])/2;j+=2)
cout<<arr[i][j];
cout<<endl;
}
return 0;
}
The above code works correctly according to the question (Half of the Half) in IDEone, but SPOJ returns me a wrong answer error message. Please help.