結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
numatanumanuma
|
| 提出日時 | 2020-03-10 06:14:44 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 282 bytes |
| 記録 | |
| コンパイル時間 | 642 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 20,596 KB |
| 最終ジャッジ日時 | 2026-05-11 01:22:11 |
| 合計ジャッジ時間 | 8,648 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 RE * 2 |
| other | AC * 2 WA * 1 RE * 24 |
ソースコード
X = int(input())
if X % 10 == 0 or len(set(X)) == 1:
print(-1)
else:
X = list(X)
X.sort()
p = X[0]
n = len(X)
for i in range(1, n):
if p != X[i]:
tmp = X[i]
X[i] = p
X[0] = tmp
print(''.join(X[::-1]))
numatanumanuma