| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148959 | 成书骏 | 19众数 | C++ | Accepted | 4 MS | 284 KB | 522 | 2026-03-04 19:41:15 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,a[1001]={},x,max=0,max_i; cin>>n; for(int i=1;i<=n;i++){ cin>>x; a[x]++; } for(int i=1;i<=1000;i++){ if(a[i]>max){ max=a[i]; max_i=i; } } cout<<max_i; return 0; }