結果

問題 No.268 ラッピング(Easy)
ユーザー rpy3cpprpy3cpp
提出日時 2015-08-21 22:34:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 5,000 ms
コード長 286 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 10,688 KB
実行使用メモリ 8,276 KB
最終ジャッジ日時 2023-09-25 14:55:14
合計ジャッジ時間 1,087 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,068 KB
testcase_01 AC 17 ms
8,228 KB
testcase_02 AC 17 ms
8,148 KB
testcase_03 AC 16 ms
8,216 KB
testcase_04 AC 15 ms
8,120 KB
testcase_05 AC 16 ms
8,220 KB
testcase_06 AC 16 ms
8,156 KB
testcase_07 AC 16 ms
8,232 KB
testcase_08 AC 15 ms
8,096 KB
testcase_09 AC 15 ms
8,148 KB
testcase_10 AC 15 ms
8,276 KB
testcase_11 AC 15 ms
8,264 KB
testcase_12 AC 15 ms
8,152 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools

a, b, c = map(int, input().split())
p, q, r = map(int, input().split())
record = float('inf')
for na, nb, nc in itertools.permutations([a, b, c]):
    score = (na + nb) * p + (nb + nc) * q + (nc + na) * r
    if score < record:
        record = score
print(record * 2)
0