結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
syunsuke
|
| 提出日時 | 2019-11-22 23:43:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 189 bytes |
| 記録 | |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 12,868 KB |
| 最終ジャッジ日時 | 2024-10-11 06:27:39 |
| 合計ジャッジ時間 | 2,795 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 17 |
ソースコード
N=list(input())
N.sort(reverse=True)
import copy
ANS=copy.deepcopy(N)
ANS[-1],ANS[-2]=ANS[-2],ANS[-1]
if ANS==N:
print(-1)
elif ANS[0]=="0":
print(-1)
else:
print("".join(ANS))
syunsuke