你们来做小老师

B2078 含 k 个 3 的数

Xiaonao_Dali @ 2023-10-29 14:09:16

求求问一下哪```

include <iostream>

using namespace std;

int main() { int m, k, n, b, i; cin >> m >> k;

n = m;
i = 0;
while (n >= 1)
{
    b = n % 10;
    if (b == 3)
    {
        i++;
    }
    n /= 10;
}
if(i==k){
    printf("YES");
}
else{
    printf("NO");
}
return 0;

}


错了

by Teto_etf @ 2023-10-29 14:44:19

我最便宜,一天只要 (unsigned long long)(-1) 块钱


by Jorisy @ 2023-10-29 14:45:22

一天 rand() 块,我来教你!


by xingze @ 2023-10-29 14:45:33

顺便捞:https://www.luogu.com.cn/discuss/721406


by Vsinger_洛天依 @ 2023-10-29 14:46:30

0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712^{0x66ccff0712}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}

by LiJoQiao @ 2023-10-29 14:46:55

m 需要 long long 类型。


by Eleveslaine @ 2023-10-29 14:47:01


by Vsinger_洛天依 @ 2023-10-29 14:49:11


by Alvis_F @ 2023-10-29 14:51:31

qpcg


by xingze @ 2023-10-29 14:53:44

hqlm


by IOI_AK_TLR @ 2023-10-29 14:58:34

@z18659780866 开longlong。


上一页 | 下一页