1 solutions

  • 0
    @ 2025-12-3 8:19:18

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int tmp,bj;
    string s;
    int main()
    {
    	cin>>s;
    	for(int i=0;i<=s.size();i++)
    	{
    		if(s[i]>='0' && s[i]<='9') tmp=tmp*10+s[i]-'0',bj=1;
    		else{
    			if(bj==1) cout<<tmp<<endl;
    			tmp=0;bj=0;
    		}
    	}
    	return 0;
    }
    
    • 1

    Information

    ID
    733
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    4
    Tags
    # Submissions
    45
    Accepted
    22
    Uploaded By