title: what is the cause of runtime error(other) in the following code
body: <p>I was trying to solve a problem( <a href="http://www.codechef.com/BTCD2012/problems/DOORS" rel="nofollow">http://www.codechef.com/BTCD2012/problems/DOORS</a>) on an online judge. Following is the code for the problem.When i submit the judge gives runtime error(other).Am i using too much memory,if it is so then please help me out in finding other way,because memory has been used according to given constraints.</p>
  
  <p>The constraint are as follow:</p>
  
  <p>0&lt; t1 &lt;1000000;</p>
  
  <p>0&lt; num&lt;100000000;</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  int a[100000001];
  int main()
  {
  
      int  t=3,j,k1,g,k=1,m,n=0,i,t1,num;
      for(i=1;i&lt;10000;i++)
      {
          m=i*i;
          n=n+t;
          for(j=m;j&lt;=n;j++)
          {
              a[j]=k;
          }
          k++;
          t=t+2;
          // printf("a[%d]--&gt; %d\n",n,a[n]);
     }
  
     scanf("%d",&amp;t1);
  
     for(k1=0;k1&lt;t1;k1++)
     {
         scanf("%d",&amp;num);
         printf("%d\n",a[num]);
     }
     getch();
     // return 0;
  }
  </code></pre>