結果
問題 |
No.256 桁の数字を入れ替え (2)
|
ユーザー |
![]() |
提出日時 | 2015-12-22 14:10:55 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 554 ms / 2,000 ms |
コード長 | 601 bytes |
コンパイル時間 | 2,168 ms |
コンパイル使用メモリ | 74,936 KB |
実行使用メモリ | 62,184 KB |
最終ジャッジ日時 | 2024-09-18 18:36:24 |
合計ジャッジ時間 | 4,050 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 |
ソースコード
package yukicoder; import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader buff = new BufferedReader(new InputStreamReader(System.in)); try { String line = buff.readLine(); int[] count = new int[10]; for(int i = 0; i < line.length(); ++i){ ++count[Integer.parseInt(String.valueOf(line.charAt(i)))]; } for(int i = 9; i >= 0; --i){ for(int j = 0; j < count[i]; ++j){ System.out.print(i); } } System.out.println(); } catch (Exception e) { e.getStackTrace(); } } }