-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBeecrowd1041.java
More file actions
33 lines (28 loc) · 1.04 KB
/
Beecrowd1041.java
File metadata and controls
33 lines (28 loc) · 1.04 KB
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
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Locale;
public class Beecrowd1041{
public static void main(String[] args) throws IOException {
Locale.setDefault(Locale.US);
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String[] valores = br.readLine().split(" ");
float x = Float.parseFloat(valores[0]);
float y = Float.parseFloat(valores[1]);
if(x == 0.0f && y == 0.0f) {
System.out.println("Origem");
} else if (x == 0.0) {
System.out.println("Eixo Y");
} else if (y == 0.0) {
System.out.println("Eixo X");
} else if (x > 0 && y > 0) {
System.out.println("Q1");
} else if (y > 0 && x < 0) {
System.out.println("Q2");
} else if (y < 0 && x < 0) {
System.out.println("Q3");
} else if (x > 0 && y < 0) {
System.out.println("Q4");
}
}
}