forked from maanuanubhav999/java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSolution.java
40 lines (30 loc) · 903 Bytes
/
Solution.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package Introdution;
import java.util.Scanner;
public class Solution {
public static void main(String[] args) {
Scanner scanner =new Scanner(System.in);
int N = scanner.nextInt();
boolean a,b;
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
scanner.close();
if(N>=2 && N<=5)
a= true;
else
a= false;
if(N>=6 && N<=20)
b= true;
else
b= false;
if(a && N%2==0){
System.out.println("Not Weird");
}else{
System.out.println("Weird");
}
if( b && N%2==0){
System.out.println("Weird");
}
if( N>20 && N%2==0 ){
System.out.println("Not Weird");
}
}
}