結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-11 01:44:40 |
| 言語 | Ruby (4.0.2) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 181 bytes |
| 記録 | |
| コンパイル時間 | 49 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 1,285,544 KB |
| 最終ジャッジ日時 | 2026-03-10 05:45:25 |
| 合計ジャッジ時間 | 69,338 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 MLE * 2 |
| other | AC * 1 WA * 2 TLE * 2 MLE * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
X = gets.chomp
result = X.chars.permutation(X.size).reject { |num_array|
num_array[0] == '0'
}.map { |num_array| num_array.join.to_i }.sort_by(&:-@)[1]
puts result ? result : -1