题解
2025-09-29 20:53:09
发布于:上海
1阅读
0回复
0点赞
输入每个字符串后,再将字符串加到总字符串上(s+=s1;)
#include<iostream>
using namespace std;
int n;
string s;
int a,b,c;
int main()
{
cin>>n;
while(n--)
{
string s1;
getline(cin,s1);
s+=s1;
}
n=s.size();
while(n--)
{
if(s[n]=='A')a++;
else if(s[n]=='B')b++;
else if(s[n]=='C')c++;
}
if(a>b&&a>c)cout<<"human";
else if(b>a&&b>c)cout<<"puppy";
else cout<<"saiyan";
}
这里空空如也







有帮助,赞一个