题解 | 数组逆置
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
while(cin>>s){
reverse(s.begin(),s.end());
cout<<s<<endl;
}
}
函数
#include <bits/stdc++.h>
using namespace std;
int main(){
string s;
while(cin>>s){
reverse(s.begin(),s.end());
cout<<s<<endl;
}
}
函数
相关推荐