TSORT wrong answer

#include<stdio.h>
int main()
{

long t,i,n;
long list[1000001]={0};
scanf("%d\n",&t);
for(i=0;i<t;i++)
{
	scanf("%d\n",&n);
	list[n]++;
}
for(i=0;i<1000001;i++)
{
	if(list[i])
	{
	      while(list[i])
          {
               printf("%d",i);
               list[i]--;
          }

	}
}

return 0;
}

Print each number in different lines.

printf("%d\n",i);

Thank u so much

1 Like

you are welcome… :slight_smile:

//