forked from alexprut/HackerRank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSolution.java
More file actions
29 lines (25 loc) · 694 Bytes
/
Solution.java
File metadata and controls
29 lines (25 loc) · 694 Bytes
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
import java.io.*;
import java.util.*;
import java.text.*;
import java.math.*;
import java.util.regex.*;
public class Solution {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
String ans="";
if(n%2==1){
ans = "Weird";
}
else {
if (2 <= n && n <= 5) {
ans = "Not Weird";
} else if (6 <= n && n <= 20) {
ans = "Weird";
} else {
ans = "Not Weird";
}
}
System.out.println(ans);
}
}