#14842: 來自台灣的小福利


Aaaaaaaaaaaaa (羅傑)

學校 : 臺北市立大同高級中學
編號 : 69102
來源 : [111.235.208.242]
最後登入時間 :
2023-09-13 09:02:41

#include<bits/stdc++.h>
using namespace std;
int main(){
int n,x;
while(cin>>n>>x){
int ans=0;
for(int i=1; i<=n; i++)
{
int temp=i;
while(temp){
if(temp%10==x) ans++;
temp/=10;
}
}
cout<<ans<<endl;
}
}