Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
88059 | 陈昊然 | 19众数 | C++ | Accepted | 10 MS | 276 KB | 251 | 2024-08-17 11:41:00 |
#include<bits/stdc++.h> using namespace std; int n,a,b,c,t[1001],p1,yg; int main() { cin>>n; for(int i=1;i<=n;i++){ cin>>p1; t[p1]++; } for(int i=1;i<=1000;i++){ if(t[i]>a){ a=t[i]; b=i; } } cout<<b; return 0; }