#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
int i, n, age[100], t, j;
while (scanf("%d", &n) != EOF) {
memset(age, 0, sizeof(age));
for (i = 0; i < n; i ++) {
scanf("%d", &t);
age[t] ++;
}
for (i = 0; i < 100; i ++) {
if (age[i] > 0) {
for (j = 0; j < age[i]; j ++)
printf("%d ", i);
}
}
printf("\n");
}
return 0;
}
/**************************************************************
Problem: 1374
User: cust123
Language: C++
Result: Accepted
Time:560 ms
Memory:1020 kb
****************************************************************/
题目1374:所有员工年龄排序
最新推荐文章于 2022-03-18 17:44:44 发布