- 取石子
幸运数字
- 2025-8-3 10:04:29 @
#include<bits/stdc++.h>
using namespace std;
int main(){
int w,k,cnt=0;
cin>>w>>k;
for(int i=1;;i++){
int j=i;
while(j!=0){
if(j%10==w){
cnt++;
}
if(cnt==k){
cout<<i;
return 0;
}
j/=10;
}
}
return 0;
}
0 条评论
目前还没有评论...
信息
- ID
- 116
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 8
- 标签
- 递交数
- 56
- 已通过
- 9
- 上传者