結果

問題 No.39 桁の数字を入れ替え
ユーザー convexineqconvexineq
提出日時 2020-11-25 07:21:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 187 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,156 KB
実行使用メモリ 71,512 KB
最終ジャッジ日時 2023-10-01 01:40:09
合計ジャッジ時間 3,281 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,512 KB
testcase_01 AC 71 ms
71,364 KB
testcase_02 AC 73 ms
71,224 KB
testcase_03 AC 76 ms
71,248 KB
testcase_04 AC 75 ms
71,248 KB
testcase_05 AC 71 ms
71,264 KB
testcase_06 AC 72 ms
71,412 KB
testcase_07 AC 72 ms
71,148 KB
testcase_08 WA -
testcase_09 AC 72 ms
71,188 KB
testcase_10 AC 73 ms
71,156 KB
testcase_11 AC 70 ms
71,428 KB
testcase_12 AC 70 ms
71,056 KB
testcase_13 AC 71 ms
71,240 KB
testcase_14 AC 71 ms
71,244 KB
testcase_15 AC 73 ms
71,128 KB
testcase_16 AC 71 ms
71,240 KB
testcase_17 AC 71 ms
71,188 KB
testcase_18 AC 71 ms
71,336 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = [*input()]
L = len(n)
s = []
for i in range(L):
    for j in range(i+1,L):
        n[i],n[j] = n[j],n[i]
        s.append(int("".join(n)))
        n[i],n[j] = n[j],n[i]

print(max(s))
0