暴力枚举
2025-07-30 11:34:51
发布于:上海
0阅读
0回复
0点赞
#include<iostream>
using namespace std;
long long n,x,ans = 0;
int main(){
cin >> n >> x;
for(int i = 1;i <= n;i++){
int j = i;
while(j / 10){
ans += (j % 10 == x);
j /= 10;
}
ans += (x == j);
}
cout << ans;
return 0;
}
这里空空如也
有帮助,赞一个