竞赛
考级
#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 am the best™半退
#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; }
嫌疑を避ける ~~
礼堂钉针
一只可爱的七七
卢督庭
#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; }
复仇者_元神启动
6.
LOVEKlee1314
四大Tian王
花道旸
#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; }
纯粹容器