C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
string s;
cin>>s;
deque<char> pipe;
bool flag=n%2==0? true:false;
for (auto& ch:s){
if (flag) pipe.push_front(ch);
else pipe.push_back(ch);
flag=!flag;
}
cout<<string(pipe.begin(),pipe.end())<<endl;
}
nb 理解可以
正解