- 分享
找数字-T3(90分)
- @ 2026-5-30 15:56:37
#include<bits/stdc++.h>
using namespace std;
string s;
int t,f,v;
int main(){
cin>>s;
s = s+"dfhiods";
int len = s.size();
for(int i = 0;i<len;i++){
if(s[i]>='0'&&s[i]<='9')t = t*10+int(s[i]-'0'),f = 1,v++;
else{
if(t == 0&&f == 0)continue;
else if(f == 1&&t == 0){
for(int j = 1;j<=v;j++)cout<<0<<endl;
}
else cout<<t<<endl;
t = 0,f = 0;
v = 0;
}
}
return 0;
}
1 条评论
-
root LV 3 SU @ 2026-5-30 18:33:58题面有更新~你重新查看一下,很快就可以ac了!
- 1