結果
| 問題 |
No.927 Second Permutation
|
| コンテスト | |
| ユーザー |
c-yan
|
| 提出日時 | 2020-03-22 01:42:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 156 bytes |
| コンパイル時間 | 77 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 12,160 KB |
| 最終ジャッジ日時 | 2024-12-24 05:55:46 |
| 合計ジャッジ時間 | 2,026 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 17 |
ソースコード
X = input()
t = sorted(X, reverse=True)
a, b = t[-2], t[-1]
t[-2], t[-1] = b, a
Y = ''.join(t)
if X == Y or Y[0] == '0':
print(-1)
else:
print(Y)
c-yan