字符串题解
2025-07-31 11:52:29
发布于:天津
1阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
#define int long long
signed main(){
string n;
cin>>n;
reverse(n.begin(),n.end());
int pos=0;
while(pos<n.size()-1&&n[pos]=='0'){
pos++;
}
cout<<n.substr(pos);
return 0;
}
时间复杂度O(n)
这里空空如也
有帮助,赞一个