• + 2 comments

    hey.. when is run this code in hacker rank it failed for one Test case i.e '4' but it gives the correct output in my console..please tell if anyone can help

    import java.util.*; public class Solution {

    private static final Scanner scanner = new Scanner(System.in);
    
    public static void main(String[] args) {
        int N = scanner.nextInt();
        if(N%2==0){
            if(N>20){
                System.out.println("Not Weird");
            }
            if(N>=2 && N<=5){
                  System.out.println(" Not Weird");
            }
             if(N>=6 && N<=20){
                  System.out.println("Weird");
            }
        }
        else{
            System.out.println("Weird");
    
    
        }
    
        scanner.close();
    }
    

    }