CANDLE problem

i have done all the necessary optimization in my code despite my code is not working in limited time though my code is compiling in 0.17 and running successfully on my gcc compiler…please help admin…

#include<stdio.h>
int main()
{
	int e1[10],e2[10],i,j=0,b=0,n;
	printf("please input the value of n\n");
	scanf("%d",&n);
	            
	            		line:
	            			while(j<n)
	    {
	            		int a=1,c=a;
	            
	            for(i=0;i<10;i++)
	            		{
	            			scanf("%d",&e1[i]);e2[i]=0;
							
			            }
	            
	                	while(1)
	             {
	                	
	            	while(c>0)                     //this loop for filling e2[] i.e. how many candles
	            	{                              //will be needed to make current value of c.                 
	            		b=c%10;
	            		for(i=0;i<10;i++)
	            		{
	            			if(i==b)
	            		   {++e2[i];break;}	
	            		}
	            		c=c/10;b=0;
	                }
	                
	            	  for(i=0;i<10;i++)
					  {
					  	if(e1[i]>=e2[i])
					  	{e2[i]=0;continue;}   // this loop is refreshing the value of e2 for each new value of c.
					  	else
					  	{
					  		printf("%d\n",a);j++;goto line;
					  	}
					  }	
					  ++a;c=a;
			     }
		}
	            return 0;
}

I would suggest, always provide the link to the problem you have trouble in. :), It would surely save us from searching the problem.

//