Company: Intuit_8feb

Difficulty: medium

Problem Statement

Buy Concert Tickets - II Problem Description A logistics coordinator must ship m identical parcels out to a regional hub, and the courier's rate changes with the calendar. Shipping T parcels on day n (day numbering starts at 0, and n begins at 0 before any day passes) costs Cost = k * n * T^2 , where k is a fixed constant for the whole plan. Given the total parcel count m and the constant k , work out the least total amount the coordinator can spend to get all m parcels shipped. Input The first line of input holds the integer m , the total number of parcels that must be shipped. The second line of input holds the integer k , the fixed constant used in the cost formula. Output Print the smallest possible total shipping cost for all m parcels. Constraints 0 ≤ m ≤ 10 6 1 ≤ k ≤ 10 4 Examples Example 1: Input: 6 2 Output: 21 Explanation: The cheapest plan spreads the shipment across three days: 3 parcels on day 0, 2 more once one day has passed, and the last one after two days h

More Intuit_8feb OA questionsInterview experiences