why am i getting run time error for enormous input output problem ?

#include<stdio.h>
main()
{
int n,k,t;
int i,count=0;
scanf("%d",&n);
scanf("%d",&k);
int a[n];
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
if(a[i]%k==0)
count++;
}
printf("%d",count);

}

you must return 0 in the end . You are not returning zero so you getting runtime error . Here is your corrected code

//