結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-07-24 18:08:57 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 398 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 16,732 KB |
| 最終ジャッジ日時 | 2026-03-28 02:14:43 |
| 合計ジャッジ時間 | 4,741 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 20 |
ソースコード
x=list(input())
if len(set(x))==1:
exit(print(-1))
x.sort()
for i in range(len(x)-1):
if [i]==x[i+1]:
continue
if i+1<len(x)-1:
x[i],x[i+1]=x[i+1],x[i]
print("".join(x[::-1]))
exit()
print(-1)
nohakai3