题解 | #倒置字符串#
倒置字符串
https://www.nowcoder.com/practice/ee5de2e7c45a46a090c1ced2fdc62355
#include <iostream>
#include<string>
using namespace std;
int main() {
string S1;
string S2;
cin>>S2;
while(cin>>S1){
S2=S1+' '+S2;
}
cout<<S2;
return 0;
}
// 64 位输出请用 printf("%lld")
查看3道真题和解析