提交时间:2026-07-04 16:11:42
运行 ID: 75609
#include<bits/stdc++.h> using namespace std; int main(){ int a=0,b=0,c=0,d,p[101]; cin>>d; for(int m=1;m<=d;m++){ cin>>p[m]; } for(int n=0;n<=d;n++){ if(p[n]==1)a++; else if(p[n]==2)b++; else if(p[n]==3)c++; } if(a>b and a>c){ cout<<"A"; return 0; } else if(b>a and b>c){ cout<<"B"; return 0; } else if(c>b and c>a){ cout<<"C"; return 0; } else { cout<<"NONE"; } return 0; }