結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-22 21:45:31 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
MLE
不安定
|
| 実行時間 | - |
| コード長 | 292 bytes |
| 記録 | |
| コンパイル時間 | 53 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 1,311,232 KB |
| 最終ジャッジ日時 | 2026-09-13 17:02:59 |
| 合計ジャッジ時間 | 2,441 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 MLE * 2 -- * 20 |
ソースコード
from itertools import permutations
X = list(input())
p = permutations(X)
s = []
for i in p:
if i[0] != "0":
s.append(i)
s = list(set(s))
s.sort(reverse=True)
ans = ""
if len(s) == 1:
print(-1)
exit()
else:
ans = ans.join(list(s[1]))
print(ans.replace(",", ""))