Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
87770 | Kevin | 满足条件的数II | C++ | Wrong Answer | 0 MS | 272 KB | 269 | 2024-08-14 16:34:14 |
#include<bits/stdc++.h> using namespace std; int main(){ int m,k,s=0,flag=0; cin>>m>>k; if(m%19==0) flag=1; while(m>0){ if(m%10==k){ s++; } m/=10; } if(flag==1&&s==k){ cout<<"YES"; } else{ cout<<"NO"; } return 0; }
------Input------
45372 1
------Answer-----
YES
------Your output-----
NO