#include<stdio.h>
int main()
{
int i,j,m,n,a[100] = {0};
while(scanf("%d", &n) && n>0)
{
for(i=1;i<=n;i++)
{
scanf("%d",&m);
a[m] = a[m] + 1;
}
for(i=1;i<=n;i++)
{
if(a[i]>0)
{
for(j=1;j<=a[i];j++)
{
printf("%d ",i);
}
}
a[i] = 0;
}
printf("\n");
}
return 0;
}
int main()
{
int i,j,m,n,a[100] = {0};
while(scanf("%d", &n) && n>0)
{
for(i=1;i<=n;i++)
{
scanf("%d",&m);
a[m] = a[m] + 1;
}
for(i=1;i<=n;i++)
{
if(a[i]>0)
{
for(j=1;j<=a[i];j++)
{
printf("%d ",i);
}
}
a[i] = 0;
}
printf("\n");
}
return 0;
}
Comments
Post a Comment