[ create a new paste ] login | about

Link: http://codepad.org/UFm6O4s1    [ raw code | fork ]

C++, pasted on Aug 31:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include<iostream>
int main(void)
{
 int size,i=0,ans=0;
 long number;
 std::cin>>size;
 std::cin>>number;
 long p[size];
 while(size>0)
 {
  std::cin>>p[i];
  size--;
  if(p[i]%(long(number))==0)
   ans++;
  i++;
 }
  std::cout<<ans;

 
 return 0;
}


Create a new paste based on this one


Comments: