等一下
by 9gehetao @ 2023-10-06 21:28:16
```c
#include<iostream>
using namespace std;
int main()
{
long long n,i,x,b,c,t=0;
cin>>n>>x;
for(i=1;i<=n;i++)
{
b=i;
while(b!=0)
{
c=b%10;
b=b/10;;
if(c==x)
}
}
cout<<t<<endl;
return 0;
}
```
by 9gehetao @ 2023-10-06 21:30:35
你没有除以10
by 9gehetao @ 2023-10-06 21:31:25
@[chenxizhe2](/user/658289)
貌似您的代码非常的令人难以理解
by WxjzKK @ 2023-10-06 21:32:19
枚举1~j然后用while不断除以10即可
by WxjzKK @ 2023-10-06 21:33:02
哟西谢谢各位大佬
by chenxizhe2 @ 2023-10-06 21:34:38
@[chenxizhe2](/user/658289) 我去试试
by chenxizhe2 @ 2023-10-06 21:36:28
long long 不是 long (第四行)
by jiguanlin @ 2023-10-11 20:43:04
@[jiguanlin](/user/1077292) 谢谢
by chenxizhe2 @ 2023-10-17 20:35:38