結果

問題 No.39 桁の数字を入れ替え
ユーザー AEnAEn
提出日時 2022-05-15 11:08:21
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 206 bytes
コンパイル時間 1,757 ms
コンパイル使用メモリ 86,812 KB
実行使用メモリ 71,444 KB
最終ジャッジ日時 2023-10-01 06:06:13
合計ジャッジ時間 2,890 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,232 KB
testcase_01 AC 72 ms
71,100 KB
testcase_02 AC 73 ms
71,208 KB
testcase_03 AC 76 ms
71,040 KB
testcase_04 AC 72 ms
71,156 KB
testcase_05 AC 72 ms
71,296 KB
testcase_06 AC 71 ms
71,444 KB
testcase_07 AC 73 ms
71,240 KB
testcase_08 WA -
testcase_09 AC 71 ms
71,040 KB
testcase_10 AC 72 ms
71,072 KB
testcase_11 AC 72 ms
71,040 KB
testcase_12 AC 72 ms
71,160 KB
testcase_13 AC 72 ms
71,328 KB
testcase_14 AC 71 ms
71,160 KB
testcase_15 AC 71 ms
71,328 KB
testcase_16 AC 71 ms
71,412 KB
testcase_17 AC 72 ms
71,088 KB
testcase_18 AC 72 ms
70,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import combinations
N = list(input())
res = 0
for v in combinations(range(len(N)), 2):
    a = N.copy()
    a[v[0]], a[v[1]] = a[v[1]], a[v[0]]
    res = max(res, int(''.join(a)))
print(res)
0