竞赛
考级
#include<iostream> using namespace std; int main(){ int x,n,i=0; cin>>x>>n; if(x>0&&x<=1000&&n>=1&&n<=4){ while(x!=0){ x/=10; i++; } if(in){ cout<<"Yes"; }else{ cout<<"No"; } }else if(x0&&n==1){ cout<<"Yes"; } return 0; }
一枚button
法兰西玫瑰
#include<bits/stdc++.h> using namespace std; int main(){ int n,k; cin>>n>>k; if(n>=pow(10.0,k-1)&&n<pow(10.0,k))cout<<"Yes"; else if(n == 0&&k==1)cout<<"Yes"; else cout<<"No"; return 0; }
沈思邈
#include<iostream> using namespace std; int main(){ int a,cnt,doo=0; cin>>a>>cnt; if(a0 && cnt1){ cout<<"Yes"; return 0; } while(a){ doo++; a/=10; } if(doo==cnt) cout<<"Yes"; else cout<<"No"; }
Lightky
逍遥骇好=&
我和“进步的蜗牛”的小伙伴都在ACGO等你,快用这个专属链接加入我们吧! 点我加入
i amthebest™搬至洛谷
#include<bits/stdc++.h> using namespace std; int main(){ int x,n; cin>>x>>n; int cnt=1; while(x>=10){ cnt++; x/=10; } if(cnt==n) cout<<"Yes"; else cout<<"No"; return 0; }
回来看看
qi
礼堂钉针
卢某人
人
#include <iostream> using namespace std; int main() { int n, x, count = 1; cin >> n >> x; while (n >= 10) { n /= 10; count++; } if (x == count) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
复仇者_元神启动
#include<iostream> using namespace std; int main(){ int a,b,c=0; cin>>a>>b; if(a0&&b1){ cout<<"Yes"; return 0; } while(a!=0){ c++; a/=10; } if(c==b){ cout<<"Yes"; return 0; } cout<<"No"; return 0; }
LS_YZY
#include <iostream> using namespace std; int main(){ string a; cin >> a; int num; cin >> num; if(a.size()==num)cout << "Yes"; else cout << "No"; return 0; }
༺དༀ༒∞░∞༒ༀཌ༻
zsy
有事找大号
LOVEKlee1314
广州北京路校区-胡天维
#include<iostream> #include<math.h> using namespace std; int main(){ int a,b,c; c = 1; cin >> a >> b; c = pow(10,b-1); a = a - (a % c); if((a / c > 0 && a / c < 10)||(a == 0 && c == 1)){ cout << "Yes"; }else{ cout << "No"; } return 0; }
纯粹容器