結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-07-24 18:08:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 238 bytes |
| 記録 | |
| コンパイル時間 | 173 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 12,328 KB |
| 最終ジャッジ日時 | 2024-07-06 12:57:47 |
| 合計ジャッジ時間 | 1,938 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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