結果
問題 | No.927 Second Permutation |
ユーザー |
![]() |
提出日時 | 2021-11-03 02:00:52 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 71 ms / 2,000 ms |
コード長 | 209 bytes |
コンパイル時間 | 449 ms |
コンパイル使用メモリ | 82,304 KB |
実行使用メモリ | 64,640 KB |
最終ジャッジ日時 | 2024-10-12 10:02:12 |
合計ジャッジ時間 | 2,967 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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)