結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-12-28 21:03:37 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 205 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,232 KB |
| 実行使用メモリ | 14,388 KB |
| 最終ジャッジ日時 | 2026-09-14 19:14:36 |
| 合計ジャッジ時間 | 2,565 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 17 |
ソースコード
x = list(input())
if len(x)==1:
print(-1)
else:
l = sorted(x,reverse=True)
m = l[0:-2] + [l[-1],l[-2]]
if int(m[0]) !=0 and l!=m:
print(int(''.join(m)) )
else:
print(-1)