結果

問題 No.927 Second Permutation
ユーザー Takuya NoguchiTakuya Noguchi
提出日時 2019-12-11 01:44:40
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 181 bytes
コンパイル時間 39 ms
コンパイル使用メモリ 11,232 KB
実行使用メモリ 15,352 KB
最終ジャッジ日時 2023-09-06 11:49:57
合計ジャッジ時間 5,900 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,300 KB
testcase_01 WA -
testcase_02 AC 77 ms
15,352 KB
testcase_03 AC 77 ms
15,348 KB
testcase_04 AC 78 ms
15,148 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 TLE -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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
0