-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjava2480.java
More file actions
59 lines (54 loc) · 1.18 KB
/
java2480.java
File metadata and controls
59 lines (54 loc) · 1.18 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
import java.util.Scanner;
public class java2480
{
public static void main(String[] args) {
Scanner ac = new Scanner(System.in);
int a1 = ac.nextInt();
int a2 = ac.nextInt();
int a3 = ac.nextInt();
int a4;
for(int i=1;i<5;i++)
{
if(a1 < a2)
{
a4 = a2;
a2 = a1;
a1 = a4;
}
if(a1 < a3)
{
a4 = a3;
a3 = a1;
a1 = a4;
}
if(a2 < a3)
{
a4 = a3;
a3 = a2;
a2 = a4;
}
}
if(a1 == a2)
{
if(a2 == a3)
{
System.out.printf("%d",10000 + 1000 * a1);
}
if(a2 != a3)
{
System.out.printf("%d",1000 + 100 * a1);
}
}
else {
if(a2 == a3)
{
System.out.printf("%d",1000 + 100 * a2);
}
if(a2 != a3)
{
System.out.printf("%d",100 * a1);
}
}
ac.close();
}
}