Can someone please tell me how to decrease the execution time of my code? Currently it is 5.48 Following is my code :
#include <iostream>
using namespace std;
int main() {
int n,k,cnt=0,t;
scanf("%d%d",&n,&k);
while(n)
{
scanf("%d",&t);
if(t%k==0)
cnt++;
n--;
}
printf("%d",cnt);
return 0;
}
Further, I have just started participating on codechef so can someone please guide me about what are the topics that one must know so that they can attempt the questions? Thanks a lot.