http://175.178.132.73/problem/0137
(题目)
#include<bits/stdc++.h>
using namespace std;
int n;
string s;
int main()
{
cin>>n;
getline(cin,s);
for(int i=1;i<=n;i++){
getline(cin,s);
int x=1,leg=s.size()/2+2;
for(int j=1;j<=leg/2;j++){
cout<<s[x]<<s[x-1];
x+=2;
}
cout<<"\n";
}
return 0;
}
为什么错了,各位大神看看