求助,样例过了,测试数据也对了,但全WA

P5705 【深基2.例7】数字反转

HZHan @ 2020-09-15 19:27:37

#include<bits/stdc++.h>
using namespace std;
string s;
int main(){
    getline(cin,s);
    int len=s.length();
    for(int i=len-1;i>=0;i--){
        cout<<s[i];
    }
    return 0;
}

by JI_NI_TAI_MEI @ 2020-09-15 19:32:15

吧getline(cin,s);改成cin>>s;


by HZHan @ 2020-09-15 19:43:36

@wangzihao1109 过了,谢谢


|