蒟蒻在线蹲大佬

B2078 含 k 个 3 的数

谕恋CE @ 2021-08-24 11:38:37

#include<iostream>
using namespace std;
int main() {
    int m,k,dot=0;
    cin>>m>>k;
    for(; true;) {
        if(m%10==3) {
            dot++;
        }
        m=m/10;
        if(m==0)break;
    }
    if(dot==k) {
        cout<<"YES";
    } else {
        cout<<"NO";
    }
    return 0;
}

70分的蒟蒻


by Textbook_blasphemy @ 2021-08-24 11:40:12

@谕恋CE long long


by __ZXYAKIOI__ @ 2021-08-24 11:40:32

不开longlong见祖宗


by 谕恋CE @ 2021-08-24 11:40:49

@陶(戴)佳伟 谢谢


|