-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBeecrowd1042.java
More file actions
37 lines (25 loc) · 889 Bytes
/
Beecrowd1042.java
File metadata and controls
37 lines (25 loc) · 889 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
33
34
35
36
37
package beecrowd1042;
import java.io.IOException;
import java.util.Arrays;
import java.util.Scanner;
public class Beecrowd1042 {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
String[] input = sc.nextLine().split(" ");
sc.close();
int[] valores = new int[input.length];
int[] entrada = new int[input.length];
for(int i = 0; i < input.length; i++){
valores[i] = Integer.parseInt(input[i]);
entrada[i] = Integer.parseInt(input[i]);
}
Arrays.sort(valores);
for(int i = 0; i < valores.length; i++){
System.out.println(valores[i]);
}
System.out.println();
for(int i = 0; i < entrada.length; i++){
System.out.println(entrada[i]);
}
}
}