結果

問題 No.39 桁の数字を入れ替え
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-05-04 17:21:58
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 5,000 ms
コード長 158 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 82,860 KB
実行使用メモリ 53,980 KB
最終ジャッジ日時 2024-04-10 05:23:50
合計ジャッジ時間 1,905 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,792 KB
testcase_01 AC 34 ms
53,160 KB
testcase_02 AC 36 ms
52,356 KB
testcase_03 AC 34 ms
53,980 KB
testcase_04 AC 35 ms
52,272 KB
testcase_05 AC 37 ms
52,848 KB
testcase_06 AC 37 ms
52,272 KB
testcase_07 AC 34 ms
52,664 KB
testcase_08 AC 35 ms
52,212 KB
testcase_09 AC 37 ms
52,872 KB
testcase_10 AC 35 ms
51,828 KB
testcase_11 AC 35 ms
52,604 KB
testcase_12 AC 36 ms
52,816 KB
testcase_13 AC 35 ms
52,564 KB
testcase_14 AC 35 ms
52,964 KB
testcase_15 AC 34 ms
52,544 KB
testcase_16 AC 36 ms
52,560 KB
testcase_17 AC 35 ms
53,436 KB
testcase_18 AC 33 ms
52,560 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

s = input()
ans = int(s)
for j in range(len(s)):
    for i in range(j):
        ans = max(ans, int(s[:i] + s[j] +  s[i + 1:j] + s[i] + s[j + 1:]))
print(ans)
0