Enormous input test time limit for c++

how will i reducethe time limit of execution of this code??

#include

using namespace std;

typedef long long int I;

int main()
{
I n,k,z;
int ctr=0;
cin>>n>>k;
if(k>10000000)
{ return 0;}
else {
cin>>z;
if(z>1000000000)
{return 0;}
for (I y=0; y<=n; y++)
{
cin>>z;
if(z>1000000000)
{return 0;}
if((z%k)==0)
{ctr++;}
}
cout<<ctr;
}
return 0;
}
help please!

There’s a decent search function behind the ‘all submissions’ button on the practice problems.

You can see how others have got good times in the same language and learn from them.

[http://www.codechef.com/status/INTEST?sort_by=Time&sorting_order=asc&language=44&status=15&handle= ]