結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-06-02 17:10:54 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 215 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 13,992 KB |
| 最終ジャッジ日時 | 2026-09-28 23:49:11 |
| 合計ジャッジ時間 | 3,470 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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="")