Nuclear Reactors(Easy Problem section)

My Program is able to do calculations upto 1000000 value but its giving SIGSSEV on values like 100.What is wrong??


(Its showing AC on all test cases except on ONE TEST case (N=100))

#include <stdlib.h>
#include <stdio.h>
#include <conio.h>
int main()
{
int a,b,c ;
scanf("%lld%lld%lld",&a,&b,&c);

//base is now(b+1);
int p=b+1,dig;
int o[100000];

int i=0;
while(a!=0)
{
dig=a%p;
o[i++]=dig;
a=a/p;
}
int t;
for(t=i;t<c;t++)
{
o[t]=0;
}
for(t=0;t<c;t++)
{
printf("%d ",o[t]);
}

getch();
return 0;
}

here is your corrected code

ideone link

donot input anything except what is given in problem (getch())
donot use conio.h as it in not a GCC header .

and there is no need of this line

for(t=i;t<c;t++)
{
o[t]=0;
}