标签:problem tle str click char isp man panel 之间
1 #include<iostream> 2 #include<iomanip> 3 //#include<bits/stdc++.h> 4 #include<cstdio> 5 #include<cmath> 6 #include<sstream> 7 #define PI 3.14159265358979 8 #define LL long long 9 #define eps 0.00000001 10 #define LL long long 11 using namespace std; 12 int main() 13 { 14 //freopen("input.txt","r",stdin); 15 char c[110]; 16 int T; 17 cin>>T; 18 getchar();//吸收回车 19 while(T--) 20 { 21 gets(c); 22 stringstream ss(c);//复制 23 string s;int sum1=0,sum2=0,sum3=0,sum4=0,sum5=0; 24 while(ss>>s)//ss->s 25 { 26 int l=s.size(); 27 for(int i=0;i<l;++i) 28 { 29 if(s[i]==‘a‘) ++sum1; 30 if(s[i]==‘e‘) ++sum2; 31 if(s[i]==‘i‘) ++sum3; 32 if(s[i]==‘o‘) ++sum4; 33 if(s[i]==‘u‘) ++sum5; 34 } 35 } 36 cout<<"a:"<<sum1<<endl; 37 cout<<"e:"<<sum2<<endl; 38 cout<<"i:"<<sum3<<endl; 39 cout<<"o:"<<sum4<<endl; 40 if(T!=0) cout<<"u:"<<sum5<<endl<<endl; 41 else cout<<"u:"<<sum5<<endl; 42 } 43 }
标签:problem tle str click char isp man panel 之间
原文地址:https://www.cnblogs.com/Auroras/p/10800188.html