my ques is about enormous input test..it shows run time error..plz help

#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 )

@arun_as

bro it seems “pre” is not working fine

Use an indent or 4 spaces before each line of code.

@rishabhprsd7 , I don’t understand that

okay i am sorry…

Actually i thought that you tried to post a code and it displayed this


="" cout<<endl;=""
cin="">>t;

So i said that “<‘pre’>” which is used for codes is not working properly…!!

@rishabhprsd7 , no problem. We all make mistakes.