結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
pete1288998
|
| 提出日時 | 2020-06-21 14:50:50 |
| 言語 | Python3 (3.15.2 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 227 bytes |
| 記録 | |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 12,644 KB |
| 最終ジャッジ日時 | 2026-10-12 05:08:06 |
| 合計ジャッジ時間 | 2,522 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 WA * 2 |
ソースコード
x = input()
x = sorted(x,reverse = True)
ans = False
for i in range(len(x)-1,1,-1):
if x[i] != x[i-1]:
x[i],x[i-1] = x[i-1],x[i]
ans = True
break
if ans :
print("".join(x))
else:
print(-1)
pete1288998