結果
| 問題 |
No.927 Second Permutation
|
| コンテスト | |
| ユーザー |
c-yan
|
| 提出日時 | 2020-03-22 01:41:18 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 157 bytes |
| コンパイル時間 | 91 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,648 KB |
| 最終ジャッジ日時 | 2024-12-24 05:53:59 |
| 合計ジャッジ時間 | 2,572 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 27 |
ソースコード
X = input()
t = sorted(X, reversed=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