1 solutions

  • 1
    @ 2024-10-13 11:34:56
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int m,k;
        cin>>m>>k;
        if(m%19==0)//符合第一个条件 
        {
            //拆数
            int cnt=0;
            while(m)
            {
                int t=m%10;
                if(t==3) cnt++;
                m/=10;
            } 
            //拆完并且统计完成
            if(cnt==k)  cout<<"YES";
            else cout<<"NO";
        }
        else
        {
            cout<<"NO";
        }
        return 0;
    }
    
    • 1

    Information

    ID
    869
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    280
    Accepted
    56
    Uploaded By