結果
問題 | No.268 ラッピング(Easy) |
ユーザー |
![]() |
提出日時 | 2025-03-20 21:00:32 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 5,000 ms |
コード長 | 402 bytes |
コンパイル時間 | 189 ms |
コンパイル使用メモリ | 83,016 KB |
実行使用メモリ | 53,548 KB |
最終ジャッジ日時 | 2025-03-20 21:00:46 |
合計ジャッジ時間 | 1,353 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 |
ソースコード
from itertools import permutations# Read inputL = list(map(int, input().split()))R, B, Y = map(int, input().split())min_total = float('inf')# Try all permutations of the dimensionsfor a, b, c in permutations(L):# Calculate the total length for this permutationtotal = 2 * (R * (a + c) + B * (a + b) + Y * (b + c))if total < min_total:min_total = totalprint(min_total)