Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
Tags
- 여러인수
- 숫자야구
- decorator
- C
- @NotEmpty
- createQuery
- 10951
- 쉬운 계단 수
- 백준
- 자료구조
- NamedParameterNotBound
- BubbleSorting
- mycp
- springboot
- 데코레이터패턴
- java
- Spring
- 디자인패턴
- Linux
- 10844
- junit
- 점세개
- 자바
- @ModelAttribute
- setParameter
- pscp
- @Spring
- 전치행렬 #C
- designpattern
- gradle
Archives
- Today
- Total
...
[JAVA] 10818: 최소 최대 본문

import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int nums[] = new int[num];
for(int i=0;i<num;i++){
nums[i]=sc.nextInt();
}
Arrays.sort(nums);
System.out.println(nums[0]+" "+nums[num-1]);
}
}
*배열 정렬 메소드 기억하기 !
'백준' 카테고리의 다른 글
| [C++] 10972 다음 순열 (0) | 2023.11.16 |
|---|---|
| [C++] 15663 : N과 M(9) (1) | 2023.11.15 |
| C++ 백준 1107 리모컨 (1) | 2023.11.08 |
| 백준 JAVA 10844 : 쉬운 계단 수 (363) | 2022.03.25 |
| 백준 10951 [JAVA] (0) | 2022.02.17 |