結果
| 問題 | No.256 桁の数字を入れ替え (2) |
| コンテスト | |
| ユーザー |
koukonko
|
| 提出日時 | 2015-12-22 14:10:55 |
| 言語 | Java (openjdk 26.0.2.1) |
| 結果 |
AC
|
| 実行時間 | 281 ms / 2,000 ms |
| + 989µs | |
| コード長 | 601 bytes |
| 記録 | |
| コンパイル時間 | 1,442 ms |
| コンパイル使用メモリ | 82,704 KB |
| 実行使用メモリ | 49,372 KB |
| 最終ジャッジ日時 | 2026-08-30 09:27:41 |
| 合計ジャッジ時間 | 2,797 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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();
}
}
}
koukonko