mirror of
https://github.com/m1ngsama/code4sk.git
synced 2025-12-25 02:56:17 +00:00
44 lines
588 B
C++
44 lines
588 B
C++
/*
|
|
7-6 ???????????
|
|
?? 10
|
|
?? ??
|
|
?? ??????
|
|
????????????8???(????????1~8)??????,????n???(1=n=1000),???????,????????????(??????????????????),?????????????
|
|
|
|
????:
|
|
????1?????????n(1=n=1000),?2???n???,????????
|
|
|
|
????:
|
|
???????8??????????,????4?,????????????????
|
|
|
|
????:
|
|
10
|
|
3 4 7 6 3 9 2 3 1 8
|
|
????:
|
|
1 1
|
|
2 1
|
|
3 3
|
|
4 1
|
|
5 0
|
|
6 1
|
|
7 1
|
|
8 1
|
|
*/
|
|
|
|
#include<stdio.h>
|
|
int main(){
|
|
int n,i,num;
|
|
scanf("%d",&n);
|
|
int b[9];
|
|
for(i=0;i<n;i++){
|
|
b[i]=0;
|
|
}
|
|
for(i=0;i<n;i++){
|
|
scanf("%d",&num);
|
|
b[num]++;
|
|
}
|
|
for(i=1;i<=8;i++){
|
|
printf("%4d%4d\n",i,b[i]);
|
|
}
|
|
return 0;
|
|
}
|