#24621: 708 AC程式碼


31415 (32陳俞安808)


#include <bits/stdc++.h>

using namespace std;

int main()

{

int Justin,Moq;

while(cin>>Justin>>Moq)

{

int Mia=0;

for(int i=1;i<=Justin; i++)

{

int Eric=i;

while (Eric)

{

if(Eric%10==Moq) Mia++;

Eric/=10;

}

}

cout<<Mia<<'\n';

}

}