結果

問題 No.268 ラッピング(Easy)
ユーザー matsu7874matsu7874
提出日時 2015-08-21 22:46:14
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 304 bytes
コンパイル時間 102 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 8,268 KB
最終ジャッジ日時 2023-09-25 14:59:18
合計ジャッジ時間 1,025 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,100 KB
testcase_01 AC 19 ms
8,056 KB
testcase_02 AC 17 ms
8,156 KB
testcase_03 AC 17 ms
8,268 KB
testcase_04 AC 17 ms
8,064 KB
testcase_05 AC 16 ms
8,152 KB
testcase_06 AC 17 ms
8,108 KB
testcase_07 AC 17 ms
8,088 KB
testcase_08 AC 16 ms
8,092 KB
testcase_09 AC 16 ms
8,088 KB
testcase_10 AC 17 ms
8,088 KB
testcase_11 AC 17 ms
8,064 KB
testcase_12 AC 17 ms
8,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
L = [int(x) for x in input().split()]
C = [int(x) for x in input().split()]

L.sort()
min_length = float('inf')
for l in itertools.permutations(L):
    length = (l[0]*2+l[1]*2)*C[0] + (l[1]*2+l[2]*2)*C[1] + (l[2]*2+l[0]*2)*C[2]
    min_length = min(min_length, length)
print(min_length)
0