-
[java]백준 수 정렬하기 3 10989번알고리즘 문제풀이/백준(자바) 2023. 4. 28. 22:16
코드
import java.io.BufferedReader; import java.io.InputStreamReader; import java.util.Arrays; public class BOJ_10989 { public static void main(String[] args) throws Exception{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int t = Integer.parseInt(br.readLine()); int q[] =new int[t]; for (int i = 0; i < t; i++) {//for 반복 q[i]=Integer.parseInt(br.readLine()); } Arrays.sort(q); for(int i : q) {//for 요소 sb.append(i).append('\n'); } System.out.println(sb); } }
링크
https://www.acmicpc.net/problem/10989
'알고리즘 문제풀이 > 백준(자바)' 카테고리의 다른 글
[java]백준 N번째 큰 수 2693번 (0) 2023.04.30 [java]백준 엄청난 부자2 1271번 (0) 2023.04.29 [java]백준 A+B 26711번 (0) 2023.04.27 [java]백준 접미사 배열 11656번 (0) 2023.04.26 [java]백준 평균 점수 10039번 (0) 2023.04.25