3 solutions

  • 0
    @ 2023-10-25 16:05:10
    #include <stdio.h>
    #include<math.h>
    #pragma warning(disable:4996) 
    int main()
    {
        int m, k, temp = 0;
       
        scanf("%d%d", &m, &k);
        if (m % 19 == 0)
        {
            while (m)
            {
                if (m % 10 == 3) temp ++ ;
                m /= 10;
            }
        }
        if (temp == k)
        {
            printf("YES");
        }
        else
        {
            printf("NO");
        }
     
        return 0;
    }
    

    Information

    ID
    6756
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    4
    Tags
    (None)
    # Submissions
    138
    Accepted
    64
    Uploaded By