Initiate Luogu

This commit is contained in:
e2hang
2025-08-13 21:38:49 +08:00
parent ab606e0cbd
commit 8bfe9f31f3
22 changed files with 735 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
#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;
}