Advertisement
Guest User

Untitled

a guest
May 27th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5. // add the two lines below
  6. ios_base::sync_with_stdio(false);
  7. cin.tie(NULL);
  8.  
  9. int n, k, t;
  10. int cnt = 0;
  11. cin >> n >> k;
  12. for(int i=0; i<n; i++){
  13. cin >> t;
  14. if(t % k == 0) cnt++;
  15. }
  16. cout << cnt << "\n";
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement