結果

問題 No.39 桁の数字を入れ替え
ユーザー zimphazimpha
提出日時 2017-12-13 22:45:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 37 ms / 5,000 ms
コード長 177 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 82,268 KB
実行使用メモリ 53,416 KB
最終ジャッジ日時 2024-04-10 05:48:31
合計ジャッジ時間 1,554 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,760 KB
testcase_01 AC 35 ms
53,416 KB
testcase_02 AC 36 ms
52,272 KB
testcase_03 AC 35 ms
52,200 KB
testcase_04 AC 35 ms
52,952 KB
testcase_05 AC 33 ms
52,140 KB
testcase_06 AC 33 ms
52,440 KB
testcase_07 AC 33 ms
53,052 KB
testcase_08 AC 33 ms
52,564 KB
testcase_09 AC 33 ms
52,360 KB
testcase_10 AC 34 ms
52,488 KB
testcase_11 AC 35 ms
52,028 KB
testcase_12 AC 35 ms
52,560 KB
testcase_13 AC 37 ms
52,212 KB
testcase_14 AC 35 ms
52,124 KB
testcase_15 AC 34 ms
53,220 KB
testcase_16 AC 34 ms
52,996 KB
testcase_17 AC 34 ms
52,736 KB
testcase_18 AC 35 ms
53,292 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = list(input())
ret = ''.join(n)
for i in range(len(n)):
  for j in range(i):
    n[i], n[j] = n[j], n[i]
    ret = max(ret, ''.join(n))
    n[i], n[j] = n[j], n[i]
print(ret)
0