Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
37669 C++|刘一阳 含k个3的数 C++ 解答错误 0 MS 248 KB 327 2024-01-22 16:08:15

Tests(0/1):


#include<iostream> using namespace std; int a,k; int main() { cin>>a>>k; int g,s,b,q,w,cnt; g=a%10; s=a/10%10; b=a/100%10; q=a/1000; w=a/10000; if(a%19==0){ for(int i=0;i<k;i++){ if(g==3||b==3||q==3||w==3) cnt++; } } else cout<<"NO"; if(cnt==k) cout<<"YES"; else cout<<"NO"; return 0; }


测评信息: