Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
87771 | Kevin | 满足条件的数II | C++ | Wrong Answer | 0 MS | 264 KB | 275 | 2024-08-14 16:35:17 |
#include<bits/stdc++.h> using namespace std; int main(){ long long 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