My issue
while submission I am shown status “time limit exceeded” but the code is running properly.
what should i do??
My code
// Update the code below to solve the problem
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int N;
cin >> N;
int flag=0;
for (int i=0;i<N;i++){
for (int j=0;j<N;j++){
if(((2*i)+(7*j))==N){
cout<<"YES"<<endl;
flag=1;
}
}
}
if (flag==0){
cout<<"NO"<<endl;
}
}
}
Learning course: C++ for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone