24 lines
635 B
Java
24 lines
635 B
Java
import java.util.*;
|
|
|
|
public class DS_array {
|
|
public static void main(String[] args) {
|
|
Scanner sc = new Scanner(System.in);
|
|
ArrayList<Integer> numbers = new ArrayList<>();
|
|
String[] input = sc.nextLine().split(" ");
|
|
sc.close();
|
|
for(String num : input){
|
|
numbers.add(Integer.parseInt(num));
|
|
}
|
|
|
|
int min = numbers.get(0);
|
|
int max = numbers.get(0);
|
|
for(int num : numbers){
|
|
min = Math.min(min, num);
|
|
max = Math.max(max, num);
|
|
}
|
|
|
|
System.out.printf("To. Rino\n최소값 : %d\n최대값 : %d\n..\n",min,max);
|
|
|
|
}
|
|
}
|