結果
問題 |
No.927 Second Permutation
|
ユーザー |
![]() |
提出日時 | 2022-07-24 18:02:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 229 bytes |
コンパイル時間 | 376 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,776 KB |
最終ジャッジ日時 | 2024-07-06 12:50:48 |
合計ジャッジ時間 | 5,807 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 4 WA * 2 RE * 21 |
ソースコード
x=list(input()) b="" for i in x: b+=i b=int(b) x.sort(reverse=True) x[len(x)-1],x[len(x)-2]=x[len(x)-2],x[len(x)-1] if x[0]=="0": exit(print(-1)) a="" for i in x: a+=i if int(a)==b: exit(print(-1)) print(int(a))