#24623: ㄏ


ce5324 (伃)

學校 : 臺北市私立延平高級中學
編號 : 128513
來源 : [219.70.166.115]
最後登入時間 :
2021-06-06 21:44:53
b330. NOIP2013 1.记数问题 -- NOIP2013普及组第一题 | From: [111.235.252.96] | 發表日期 : 2021-03-11 17:26

#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;
}
}

 

 
ZeroJudge Forum