#include
using namespace std;
int main()
{
long n,k;
unsigned long int count=0,i;
cin>>n>>k;
long arr[n];
for(i=0;i<n;i++)
{
cin>>arr[i];
}
for(i=0;i<n;i++)
{
if((arr[i]%k)==0)
count++;
}
cout<<count<<endl;
return 0;
}
What is the question? (any link to the question)
You can use (scanf and printf) or (fast I/O) for this program and also while taking input a[i] calculate a[i]%k. For more clarification give the link of the question.
1 Like
link of the question…
Please post a link to your question
Post it along with your question.