結果

問題 No.268 ラッピング(Easy)
ユーザー nanaenanae
提出日時 2017-02-02 18:20:20
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 556 bytes
コンパイル時間 152 ms
コンパイル使用メモリ 10,928 KB
実行使用メモリ 8,316 KB
最終ジャッジ日時 2023-08-25 18:07:16
合計ジャッジ時間 1,191 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,128 KB
testcase_01 AC 15 ms
8,200 KB
testcase_02 AC 15 ms
8,304 KB
testcase_03 AC 15 ms
8,204 KB
testcase_04 AC 14 ms
8,132 KB
testcase_05 AC 14 ms
8,156 KB
testcase_06 AC 14 ms
8,136 KB
testcase_07 AC 14 ms
8,316 KB
testcase_08 AC 15 ms
8,152 KB
testcase_09 AC 14 ms
8,200 KB
testcase_10 AC 15 ms
8,268 KB
testcase_11 AC 14 ms
8,132 KB
testcase_12 AC 15 ms
8,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from itertools import permutations

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

def solve():
    L1, L2, L3 = map(int, input().split())
    R, B, Y = map(int, input().split())

    isshu = [2*(L1+L2), 2*(L2+L3), 2*(L3+L1)]
    ans = float('inf')

    for i, j, k in permutations((0,1,2)):
        ans = min(ans, isshu[i]*R + isshu[j]*B + isshu[k]*Y)

    print(ans)

    pass

if __name__ == '__main__':
    solve()
0