0
已解决
宣瑞涵
高级守护
高级守护
题目链接: 酷町堂:5257
#include<iostream>
#include <cmath>
#include<string>
#include <algorithm>
using namespace std;
string a,b;
int n,A,B,p;
int main(){
getline(cin,a);
getline(cin,b);
cin>>n;
for(int i=1;i<=n;i++){
if(a[i]=='A'&&b[i]=='B'||a[i]=='B'&&b[i]=='C'||a[i]=='C'&&b[i]=='A'){
A++;
}else if(a[i]=='B'&&b[i]=='A'||a[i]=='C'&&b[i]=='B'||a[i]=='A'&&b[i]=='C'){
B++;
}else{
p++;
}
}
if(A>B){
cout<<"酷酷赢"<<" "<<A;
}else if(B>A){
cout<<"丁丁赢"<<" "<<B;
}else{
cout<<"平局";
}
return 0;
}