結果
問題 | No.256 桁の数字を入れ替え (2) |
ユーザー | Tsukasa_Type |
提出日時 | 2018-02-11 23:10:21 |
言語 | Java21 (openjdk 21) |
結果 |
AC
|
実行時間 | 922 ms / 2,000 ms |
コード長 | 364 bytes |
コンパイル時間 | 2,337 ms |
コンパイル使用メモリ | 75,120 KB |
実行使用メモリ | 62,424 KB |
最終ジャッジ日時 | 2024-05-01 09:02:19 |
合計ジャッジ時間 | 5,226 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 134 ms
41,108 KB |
testcase_01 | AC | 133 ms
41,560 KB |
testcase_02 | AC | 922 ms
60,520 KB |
testcase_03 | AC | 908 ms
62,424 KB |
ソースコード
import java.util.*; public class Main { static Scanner sc = new Scanner(System.in); public static void main(String[] args) { String[] s = sc.next().split(""); int[] ar = new int[s.length]; for (int i=0; i<s.length; i++) { ar[i] = Integer.parseInt(s[i]); } Arrays.sort(ar); for (int i=ar.length-1; i>=0; i--) { System.out.print(ar[i]); } } }