Here is the link to the question asked:
http://ww2.codechef.com/problems/INTEST/
This is my code for the solution:
#include<iostream>
typedef long long ll;
using namespace std;
int main()
{
ll n,k,t;
ll count=0;
scanf("%lld %lld",&n,&k);
while(n--)
{
scanf("%lld",&t);
if(t%k==0)
count++;
}
printf("%lld\n",count);
return 0;
}
Now I can't seem to understand why this code is producing a WRONG ANSWER as the result. I checked some successful submissions. The AC codes I viewed are almost the same. Then why does this code produce an error?