結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー matsuyoshi30matsuyoshi30
提出日時 2016-02-07 02:07:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 684 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 2,186 ms
コンパイル使用メモリ 74,652 KB
実行使用メモリ 67,424 KB
最終ジャッジ日時 2023-10-21 19:35:36
合計ジャッジ時間 4,445 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
57,436 KB
testcase_01 AC 135 ms
57,440 KB
testcase_02 AC 684 ms
67,364 KB
testcase_03 AC 670 ms
67,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.Arrays;

class Main {
	public static void main(String[] args) throws Exception {
		Scanner in = new Scanner(System.in);
		String n = in.next();

		char[] c = n.toCharArray();

		Arrays.sort(c);

		for(int i=c.length-1; i>=0; i--) {
			System.out.print(c[i]);
		}
		System.out.println();
	}
}
0