My issue
This is not a correct way of solving (solution given by CodeChef).
Can anyone give a general solution for this, which can also be useful for larger numbers.
My code
// Solution as follows
#include <bits/stdc++.h>
using namespace std;
int main()
{
int t;
cin >> t;
while(t--)
{
int N;
cin >> N;
if (N == 1 || N == 3 || N == 5)
{
cout << "No" << endl;
}
else
{
cout << "Yes" << endl;
}
}
}
Learning course: C++ for problem solving - 2
Problem Link: CodeChef: Practical coding for everyone