結果
問題 |
No.927 Second Permutation
|
ユーザー |
|
提出日時 | 2019-12-28 21:03:37 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 205 bytes |
コンパイル時間 | 251 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 14,040 KB |
最終ジャッジ日時 | 2024-10-12 13:47:10 |
合計ジャッジ時間 | 2,673 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)