結果
| 問題 | 
                            No.927 Second Permutation
                             | 
                    
| コンテスト | |
| ユーザー | 
                             67oYG9nh2YMmIci
                         | 
                    
| 提出日時 | 2020-07-20 11:15:43 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 215 bytes | 
| コンパイル時間 | 118 ms | 
| コンパイル使用メモリ | 12,416 KB | 
| 実行使用メモリ | 12,032 KB | 
| 最終ジャッジ日時 | 2024-12-23 08:19:21 | 
| 合計ジャッジ時間 | 2,449 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge2 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 WA * 17 | 
ソースコード
X=str(input())
x=[]
y=[]
for i in range(len(X)):
    x.append(X[i])
x.sort(reverse=True)
x[-1],x[-2]=x[-2],x[-1]
if x[0] == "0":
    print("-1")
elif x[-2]==x[-1]:
    print("-1")
else:
    s="".join(x)
    print(s)
            
            
            
        
            
67oYG9nh2YMmIci