Run ID:150998

提交时间:2026-04-02 17:28:51

#include<bits/stdc++.h> using namespace std; //bool isVowel(char c){ // c=tolower(c); // return c=='a'||c=='e'||c=='i'||c=='o'||c=='u'; //} int main(){ char c; string s; while(cin>>c>>s){ char tar=tolower(c); int cnt=0; int len=s.size;(); for(char ch:s){ if(tolower(ch)==tar){ cnt++; } } double p==1.0*cnt/len; printf("%.5f\n",p); } return 0; }