3 solutions

  • 2
    @ 2025-8-21 15:59:18
    #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;
    }
    

    Information

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