結果
問題 | No.927 Second Permutation |
ユーザー |
![]() |
提出日時 | 2020-03-11 16:58:04 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 48 ms / 2,000 ms |
コード長 | 217 bytes |
コンパイル時間 | 395 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 12,032 KB |
最終ジャッジ日時 | 2024-11-16 00:20:10 |
合計ジャッジ時間 | 2,181 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
X=sorted(input(),reverse=True)if X[0]==X[-1] or X[1]=="0":print(-1)else:for i in reversed(range(1,len(X))):if X[i]!=X[i-1]:X[i],X[i-1]=X[i-1],X[i]print("".join(X));exit()