Sort by

recency

|

2029 Discussions

|

  • + 0 comments

    if (N % 2 == 1) { System.out.println("Weird"); } else { if (N >= 2 && N <= 5) { System.out.println("Not Weird"); } else if (N >= 6 && N <= 20) { System.out.println("Weird"); } else { System.out.println("Not Weird"); } }

  • + 0 comments

    if((N % 2 != 0)||(N % 2 ==0 && N>=6 && N<=20)){ System.out.println("weird"); }else if((N % 2 ==0 && N >=2 && N>=20)||(N<=5)){ System.out.println("Not weird"); }

  • + 0 comments

    if(N<=5 && N%2==0 ||(N>20 && N%2==0)){ System.out.println("Not Weird"); } else{ System.out.println("Weird"); }

  • + 0 comments

    if( N % 2 == 0) { if((N>=2 && N<= 5) || (N>20)) System.out.println("Not Weird");

              else if (N>= 6 && N<= 20)            
                  System.out.println("Weird");
        }
        else
              System.out.println("Weird");
    
  • + 0 comments

    n = int(input().strip())

    if n % 2 == 1: print("Weird") elif n % 2 == 0 and 2 <= n <= 5: print("Not Weird") elif n % 2 == 0 and 6 <= n <= 20: print("Weird") elif n % 2 == 0 and n > 20: print("Not Weird")