結果

問題 No.256 桁の数字を入れ替え (2)
ユーザー utsumidaisukeutsumidaisuke
提出日時 2017-03-10 11:49:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 75 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 17,620 KB
最終ジャッジ日時 2023-09-06 12:56:48
合計ジャッジ時間 700 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,928 KB
testcase_01 AC 15 ms
7,944 KB
testcase_02 WA -
testcase_03 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = list(map(int,input()))
temp = n[:]

mx1 = max(n)
a = n.index(mx1)

temp[0] = mx1
temp[a] = n[0]
temp2 = temp[:]

mx2 = max(temp[1:])
b = temp[1:].index(mx2)

temp2[1] = mx2
temp2[b+1] = temp[1]
ans = list(map(str, temp2))
print("".join(ans))
0