-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAPCS201610 example
More file actions
79 lines (73 loc) · 1.11 KB
/
Copy pathAPCS201610 example
File metadata and controls
79 lines (73 loc) · 1.11 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import java.util.Scanner;
public class Apcs201510Java {
public static void main(String[] args) {
int a,b,c,d,f,i,j,k;
Scanner scanner=new Scanner(System.in);
i=scanner.nextInt();
j=scanner.nextInt();
k=scanner.nextInt();
/*zone 1*/
if(i>j&&i>k){
c=i;
b=j;
a=k;
if(a+b>c){
d=a*a+b*b;
f=c*c;
if(d==f){
System.out.println("Right");
}
else if(d>f){
System.out.println("Acute");
}
else{
System.out.println("Obtuse");}
}
else{
System.out.println("No");
}
}
/*zone2*/
else if(j>k&&j>i){
c=j;
b=i;
a=k;
if(a+b>c){
d=a*a+b*b;
f=c*c;
if(d==f){
System.out.println("Right");
}
else if(d>f){
System.out.println("Acute");
}
else{
System.out.println("Obtuse");}
}
else{
System.out.println("No");
}
}
/*zone 3*/
else if(k>j&&k>i){
c=k;
b=i;
a=j;
if(a+b>c){
d=a*a+b*b;
f=c*c;
if(d==f){
System.out.println("Right");
}
else if(d>f){
System.out.println("Acute");
}
else{
System.out.println("Obtuse");}
}
else{
System.out.println("No");
}
}
}
}