Victory Robot

Your school is going to arrange a ceremony to celebrate the upcoming victory day. So the high school…

Click here to read the complete problem statement.


If you need help solving this problem, mention your approach and ask specific questions. Please avoid sharing your code and asking the Community to figure out “what’s wrong”.

why wrong answer :frowning:

T = int(input())
for N in range(T):
    N = int(input())
    if N % 2 and N > 0 == 0: print("Bangla")
    elif N == 1971: print("Joy Bangla")
    elif N == 0: print()
    else: print("Joy")

You have put nothing inside print in line 6. That’s why.
And also, you should handle the 0 cases first. This way it is easier.
I suggest using the & operator to find even and odd numbers. In that way, you won’t need to handle 0.

1 Like
#include <iostream>

using namespace std;

int main(){
       int a;
       cin>>a;
       if(a%2==0)
        cout<<"Bangla";
       else
        if(a==1971)
           cout<<"Joy Bangla";
        else
            cout<<"Joy";

	return 0;
}

why it is wrong