| 比赛 | 初一开训小练习 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 01数字 | 最终得分 | 100 |
| 用户昵称 | Youth | 运行时间 | 0.026 s |
| 代码语言 | C++ | 内存使用 | 3.72 MiB |
| 提交时间 | 2026-03-10 19:49:46 | ||
#include <bits/stdc++.h>
using namespace std;
int n,m;
int check(int x){
while(x>0){
if(x%10<2)x/=10;
else return 0;
}
return 1;
}
int main(){
freopen("torch.in","r",stdin);
freopen("torch.out","w",stdout);
cin>>n;
for(int i=1;i<=30000;i++){
if(check(n*i)){
cout<<i;
break;
}
if(i==30000)cout<<"NO";
}
return 0;
}