백준 1427 - 소트인사이드(자바)

SlowAnd·2023년 12월 29일
0
public class boj_1427 {

    public static void main(String[] args) throws IOException {
        BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter w = new BufferedWriter(new OutputStreamWriter(System.out));

        String collect = Arrays.stream(r.readLine().split(""))
                .sorted(Comparator.reverseOrder()).collect(Collectors.joining());

        w.write(collect);
        w.flush();
    }
}

0개의 댓글