Company: OpenText_9oct
Difficulty: medium
Maximize Gift Packets Problem Description Carhy's job is to deliver gift packets. Each packet consists of N types of items. Each packet is identical, and the items are present in a fixed ratio. Also, each type of item is of a particular quantity. To maximize her profit, she wishes to prepare and deliver the maximum number of packets. She wishes to calculate the sum of the quantities of each type of item used to prepare the packets, such that she can prepare the maximum number of packets in accordance with the given ratio. Write an algorithm to help Cathy calculate the sum of the quantities of each type of item so that she can prepare the maximum number of packets in accordance with the given ratio. Input The first line of the input consists of an integer N , representing the number of types of items. The second line consists of N space-separated integers ratio_1, ratio_2, ..., ratio_N representing the ratio of each type of item in a packet. The last line consists of N space-separated i