#include
using namespace std;
int main()
{
long int n,k,i,count=0,t;
cin>>n;
cin>>k;
for(i=0;i<n;i++)
{
cout<<endl;
cin>>t;
if(t%k==0)
count++;
}
cout<<count;
return 0;
}
#include
using namespace std;
int main()
{
long int n,k,i,count=0,t;
cin>>n;
cin>>k;
for(i=0;i<n;i++)
{
cout<<endl;
cin>>t;
if(t%k==0)
count++;
}
cout<<count;
return 0;
}
First of all, format your code and post it as a code, not as plain text.
Secondly, this doesn’t compile because of these lines
="" cout<<endl;=""
cin="">>t;
I don’t know if this is your real code, or if this is just some mistake while copy pasting.
But remove those
=""
form your code.
You don’t need the
cout<<endl;
as well, remove it. That should do it.
Here’s an ideone link to your answer. ( Note that I have not checked the code for Time Limit Exceeded, I just fixed the bugs that I saw )
okay i am sorry…
Actually i thought that you tried to post a code and it displayed this
="" cout<<endl;=""
cin="">>t;