19 lines
285 B
C++
19 lines
285 B
C++
#include <stdio.h>
|
|
#include <string.h>
|
|
//using namespace std;
|
|
int main(){
|
|
int a;
|
|
char b;
|
|
scanf("%d %c",&a,&b);
|
|
char tmp[10]="";
|
|
int js=0;
|
|
for(int i=1;i<=a;i++){
|
|
sprintf(tmp,"%d",i);
|
|
for(int j=0;j<strlen(tmp);j++){
|
|
if(tmp[j]==b) js++;
|
|
}
|
|
}
|
|
printf("%d",js);
|
|
return 0;
|
|
}
|