| 比赛 | 初一开训小练习 | 评测结果 | AAAAAAAAAA |
|---|---|---|---|
| 题目名称 | 01数字 | 最终得分 | 100 |
| 用户昵称 | golden_w | 运行时间 | 0.027 s |
| 代码语言 | C++ | 内存使用 | 3.68 MiB |
| 提交时间 | 2026-03-10 19:47:49 | ||
#include<bits/stdc++.h>
using namespace std;
int n;
int check(int x){
while(x!=0){
int tep=0;
tep=x%10;
if(tep!=0&&tep!=1){
return 0;
}
x/=10;
}
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(i*n)==1){
cout<<i;
return 0;
}
}
cout<<"NO";
return 0;
}