-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsibice.java
More file actions
31 lines (25 loc) · 864 Bytes
/
Copy pathsibice.java
File metadata and controls
31 lines (25 loc) · 864 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
import java.util.Scanner;
import java.text.DecimalFormat;
import java.lang.Math;
import java.lang.Integer;
public class sibice {
public static void main(String args[]) {
Scanner input = new Scanner(System.in);
int n = input.nextInt();
int w = input.nextInt();
int h = input.nextInt();
int[] n2 = new int[n];
String[] result = new String[n];
for (int i = 0; i < n; i++) {
n2[i] = input.nextInt();
if (n2[i] > java.lang.Math.pow(java.lang.Math.pow(w, 2) + java.lang.Math.pow(h, 2), .5)) {
result[i] = "NE";
} else {
result[i] = "DA";
}
}
for (int i = 0; i < n; i++) {
System.out.print(result[i] + "\n");
}
}
}