Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
351896 | 鲁嘉俊 | 【C4-6】统计每个数出现的次数 | C++ | Accepted | 100 | 4 MS | 316 KB | 232 | 2025-09-21 16:05:13 |
#include<bits/stdc++.h> using namespace std; int n,m,a[20005]; int main( ){ cin>>n; for(int i=1;i<=n;i++){ cin>>m; a[m]++; } for(int i=1;i<=20000;i++){ if(a[i]!=0) cout<<i<<" "<<a[i]<<endl; } return 0; }