このツイートは、中華料理店1の翼の可能な注文のリストです。
ピザを注文するとき、私は通常、簡単な計算である最高のピザ価格比を与えるサイズを計算します。しかし、このレストランでの注文の価格を最小化することはそれほど単純な作業ではないため、そこでの次の注文に備えたいと思います。
チャレンジ
例
[50,50],[25,25,50],[25,25,25,25]
[50,50]
ルール
- すべての可能な注文を返すことを選択できます
テストケース
4 -> [4] (4.55)
23 -> [23] (26.10)
24 -> [6,18],[9,15],[12,12] (27.20)
31 -> [6,25] (34.60)
32 -> [4,28],[6,26],[7,25] (35.75)
33 -> [4,29],[5,28],[6,27],[7,26],[8,25] (36.90)
34 -> [6,28],[9,25] (38.00)
35 -> [35] (39.15)
125 -> [125] (139.00)
200 -> [25,50,125] (222.40)
201 -> [26,50,125] (223.55)
250 -> [125,125] (278.00)
251 -> [26,50,50,125] (279.15)
418 -> [15,28,125,125,125],[18,25,125,125,125] (465.20)
1001 -> [26,50,50,125,125,125,125,125,125,125] (1113.15)
12345 -> [15,80,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125],[25,70,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125],[45,50,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125,125] (13728.10)
注:これらのテストケースには、価格を含むすべての可能な出力がリストされます。出力する必要があるのは1つだけで、価格を出力する必要はありません!
1:ここで CSVとしてデータを見つけることができます。