Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
101528 | 林泽豪 | 统计各数据个数 | C++ | 通过 | 100 | 10 MS | 256 KB | 313 | 2023-09-09 10:10:16 |
#include<iostream> #include<cstdio> using namespace std; int b[21]; int main(){ //freopen("statistics.in","r",stdin); //freopen("statistics.out","w",stdout); int a,p=0; while(cin>>a){ b[a]++; p++; } cout<<p<<endl; for(int i=0;i<=20;i++){ cout<<b[i]<<' '; } }