1 条题解

  • 0
    @ 2024-12-5 18:10:16

    C++ :

    #include<bits/stdc++.h>
    using namespace std;
    int q,a,z,w,s,x,e,d,c,r,f,v,t,g,b,y,h,n,u,j,m,i,k,o,l,p;
    int main(){
    cin>>n;
    while(n!=0){
    s=n%10;
    n=n/10;
    if(s==1){
    c++;
    }
    }
    cout<<c;
    return 0;
    }
    
    
    • 1

    信息

    ID
    9118
    时间
    1000ms
    内存
    128MiB
    难度
    (无)
    标签
    递交数
    0
    已通过
    0
    上传者