#24621: 708 AC程式碼


31415 (32陳俞安808)

學校 : 臺北市私立延平高級中學
編號 : 128530
來源 : [203.72.178.2]
最後登入時間 :
2022-06-20 13:07:29

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

}

}