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
- java
- 숫자야구
- @NotEmpty
- 자료구조
- Spring
- 전치행렬 #C
- Linux
- springboot
- decorator
- 디자인패턴
- C
- 여러인수
- mycp
- pscp
- 10951
- BubbleSorting
- 10844
- @ModelAttribute
- 데코레이터패턴
- gradle
- setParameter
- designpattern
- 점세개
- 쉬운 계단 수
- createQuery
- NamedParameterNotBound
- junit
- @Spring
- 자바
- 백준
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 |
Comments