I am getting wrong answer for problem code TRISQ but my code is right.

using namespace std;
int main()
int x,n, y;
cin >> n;
if (n>1 && n<1000)

while (n–){
cin >> x ;
if (x>1 && x<10000)

cout << y << endl;



The answer is really simple…

Observe the answers and try to find a sequence similar to that…

I won’t reveal the sequence here, so i don’t spoil the fun…

If still unable to solve, Have a look at this code…

Accept answer if you find this helpful…

Feel free to ask anything…