- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsolution.java
More file actions
Latest commit
32 lines (24 loc) · 779 Bytes
/
Copy pathsolution.java
File metadata and controls
32 lines (24 loc) · 779 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
30
31
32
// github.com/Utkarsh299-tech
importjava.io.*;
importjava.math.*;
importjava.security.*;
importjava.text.*;
importjava.util.*;
importjava.util.concurrent.*;
importjava.util.regex.*;
publicclassSolution {
privatestaticfinalScannerscanner = newScanner(System.in);
publicstaticvoidmain(String[] args) {
intN = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
scanner.close();
if (N % 2 != 0)
System.out.println("Weird");
elseif (N % 2 == 0 && (2 <= N && N <= 5))
System.out.println("Not Weird");
elseif (N % 2 == 0 && (6 <= N && N <= 20))
System.out.println("Weird");
else
System.out.println("Not Weird");
}
}