結果
| 問題 | No.927 Second Permutation |
| コンテスト | |
| ユーザー |
nohakai3
|
| 提出日時 | 2022-07-24 18:02:17 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 229 bytes |
| 記録 | |
| コンパイル時間 | 656 ms |
| コンパイル使用メモリ | 20,956 KB |
| 実行使用メモリ | 21,492 KB |
| 最終ジャッジ日時 | 2026-03-28 02:04:56 |
| 合計ジャッジ時間 | 9,030 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))
nohakai3