Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Enormous input Test Code question

$
0
0

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?


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>