結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー jimanojimano
提出日時 2018-02-12 14:58:20
言語 Java21
(openjdk 21)
結果
AC  
実行時間 642 ms / 2,000 ms
コード長 580 bytes
コンパイル時間 3,498 ms
コンパイル使用メモリ 71,900 KB
実行使用メモリ 65,216 KB
最終ジャッジ日時 2023-08-16 03:01:44
合計ジャッジ時間 5,244 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
49,780 KB
testcase_01 AC 42 ms
49,676 KB
testcase_02 AC 642 ms
65,216 KB
testcase_03 AC 598 ms
65,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package me.yukicoder;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;

public class No0256 {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] input = br.readLine().split("");
		int[] arr = new int[input.length];
		
		for (int i = 0; i < input.length; i++) {
			arr[i] = Integer.parseInt(input[i]);
		}
		Arrays.sort(arr);
	
		for (int i = input.length - 1; i >= 0; i--) {
			System.out.print(arr[i]);
		}
	}
}
0