最准题解
2025-04-05 16:29:33
发布于:浙江
4阅读
0回复
0点赞
#include <iostream>
using namespace std;
int main() {
int m, k;
cin >> m >> k;
if (m % 19 != 0) {
cout << "NO";
return 0;
}
int count = 0;
int temp = m;
while (temp > 0) {
int digit = temp % 10;
if (digit == 3) {
count++;
}
temp = temp / 10;
}
if (count == k) {
cout << "YES";
} else {
cout << "NO";
}
return 0;
}
绝对正确!!!
不尝试
这里空空如也
有帮助,赞一个