i am having problem in enormous input test

i run the following code it is working fine but showing a run time error when i submitted here please guide me

#include<stdio.h>
int t,k,i,count=0;
void main()
{
    scanf("%d",&t);
    scanf("%d",&k);
    while(t--)
    {
        scanf("%d",&i);
        if(i%k==0)
        {
            count++;
        }
    }
    printf("%d",count);
}

Please read FAQ - http://www.codechef.com/wiki/faq#Why_do_I_get_an_NZEC

NZEC stands for Non Zero Exit Code. For C users, this will be generated if your main method does not have a return 0; statement.

you mean to say that i can’t have a void function here

exactly, but this is trivial change, isn’t it?

now it is working but execution time is very high it is 5.57
any guide how can i improve it
and also please tell me why it is taking so much time

if you are interested in execution time, try this filter (http://www.codechef.com/status/INTEST?language=11&status=15&handle=&sort_by=All&sorting_order=asc&Submit=GO) and find out by yourself :wink:

//