백준10818번1 [백준 10818번 - java] 최소, 최대 https://www.acmicpc.net/problem/10818 내 답안 - 1 (Scanner + 배열 사용) import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException{ int max = -1000001; int min = 1000001; Scanner s = new Scanner(System.in); int N = s.nextInt(); int[] arr = new int[N]; for (int i=0; i arr[i]) min = arr[i]; if (max < arr[i]) max = arr[i]; } System.o.. 2021. 11. 8. 이전 1 다음