题解 | #反序输出#
反序输出
https://www.nowcoder.com/practice/171278d170c64d998ab342b3b40171bb
#include <bits/stdc++.h>
using namespace std;
int main(){
string a;
while(cin >> a){
for(int i = a.length()-1;i>=0;i--){
cout << a[i] ;
}
cout << endl;
}
}
做这题有点浪费时间了,主要是注意length()-1
爱玛科技公司福利 6人发布
