Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7986 | 邓小龙 | 满足条件的数II | C++ | Wrong Answer | 0 MS | 264 KB | 453 | 2025-05-31 20:34:21 |
#include<bits/stdc++.h> using namespace std; int main(){ int m,k; cin>>m>>k; bool f;//如果m包含k个3,则f=true,否则f=false int cnt=0;//统计m中3的个数 int t=m; while(t){//统计3的个数的 if(t%10==3) cnt++; t/=10; } if(cnt==k) f=true; else f=false; //判断m是否为19的倍数 if(m%19==0 && f) cout<<"Yes"<<endl; else cout<<"No"<<endl; return 0; }
------Input------
43833 3
------Answer-----
YES
------Your output-----
Yes