纠结 the letter可能是大写的
#include<stdio.h>
#include<math.h>
#include<string.h>
#include<algorithm>
#include<ctype.h>
using namespace std;
int main()
{
int i,t;
char str[201],c;
double n;
while(scanf("%c %s",&c,str)!=EOF){
t=strlen(str);
n=0;
for(i=0;i<t;i++){
if(tolower(c)==tolower(str[i]))
n++;
}
printf("%.5lf\n",n/t);
getchar();
}
return 0;
}