| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 61762 | 邓昊源 | 19众数 | C++ | Accepted | 9 MS | 276 KB | 274 | 2023-12-10 16:34:03 |
#include<bits/stdc++.h> using namespace std; int main(){ int t[1001]={0}; int n,shu; cin >> n; for(int i = 0;i < n;i++){ cin >> shu; t[shu]++; } int zs = 1; for(int i = 1;i<=1000;i++){ if(t[i]>t[zs]){ zs=i; } } cout <<zs; return 0; }