fork download
  1. #include<iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. long int n,k,i,count=0,t;
  7. cin>>n;
  8. cin>>k;
  9.  
  10. for(i=0;i<n;i++)
  11. {
  12. cin>>t;
  13. if(t%k==0)
  14. count++;
  15. }
  16. cout<<count;
  17. return 0;
  18. }
Success #stdin #stdout 0s 3100KB
stdin
7 3
1
51
966369
7
9
999996
11
stdout
4