結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
H20
|
| 提出日時 | 2021-11-03 02:00:52 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 87 ms / 2,000 ms |
| コード長 | 209 bytes |
| 記録 | |
| コンパイル時間 | 177 ms |
| コンパイル使用メモリ | 85,516 KB |
| 実行使用メモリ | 64,640 KB |
| 最終ジャッジ日時 | 2026-04-28 23:26:14 |
| 合計ジャッジ時間 | 3,516 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
ソースコード
X = list(input())
X.sort(reverse=True)
for i in reversed(range(len(X)-1)):
if X[i]!=X[i+1]:
X[i],X[i+1]=X[i+1],X[i]
if X[0]!='0':
print(''.join(X))
exit()
print(-1)
H20