5 条题解

  • 0
    @ 2025-10-15 1:24:51
    #include<iostream>
    #include<string.h>
    
    using namespace std;
    int main(){
        int M;
        cin>>M;
        while(M--){
            char w[8];
            cin>>w;
            int len=strlen(w);
            int g=1;
            for(int j=1;j<len;j++){
                if(w[j]=='0'&&g!=0){continue;}
                cout<<w[j];g=0;
            }if(g==1){cout<<"0";}
            cout<<'\n'; 
    
        }
        return 0;
    }
    

    信息

    ID
    159
    时间
    3000ms
    内存
    128MiB
    难度
    5
    标签
    (无)
    递交数
    642
    已通过
    271
    上传者