fork download
  1. ////debugging
  2.  
  3. #include<stdio.h>
  4.  
  5. int main()
  6. {
  7. int i=0,n,c=0;
  8. long k,t;
  9. scanf("%d%ld",&n,&k);
  10. if(k<=10000000)
  11. {
  12. while(i<n)
  13. {
  14. scanf("%ld",&t);
  15. if(t<=1000000000)
  16. {
  17. if(t%k==0)
  18. c++;
  19. }
  20.  
  21. i++;
  22. }
  23. printf("%d",c);
  24. }
  25. return 0;
  26. }
  27.  
Success #stdin #stdout 0s 2296KB
stdin
7 3
1
51
966369
7
9
999996
11
stdout
4