結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-02 17:10:54 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 215 bytes |
| 記録 | |
| コンパイル時間 | 93 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 14,396 KB |
| 最終ジャッジ日時 | 2024-11-24 04:04:18 |
| 合計ジャッジ時間 | 3,450 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 22 WA * 5 |
ソースコード
x = list(map(int, input()))
l = len(x)
x.sort(reverse=True)
for i in range(l - 1, 0, -1):
if x[i] != x[i-1]:
x[i], x[i-1] = x[i-1], x[i]
break
else:
print(-1)
exit()
print(*x, sep="")