Company: Walmart_12march
Difficulty: medium
Sweet Shop Scheme Problem Description Ram wants to buy N sweets (S1, S2, S3, S4, ..., Sn) from a shop. The shopkeeper is running a scheme: For the first 'l' sweets, the price of the i-th sweet (1-indexed, i from 1 to l) will be 'x-i+1'. The value of 'l' can be chosen such that 0 <= l <= min(N,x). For the remaining 'N-l' sweets, the price will be 'y'. Note: If l = 0, the price of all N sweets will be 'y'. The values of 'N', 'x', and 'y' are fixed. The shopkeeper can choose the value of 'l' to maximize the total cost of buying all N sweets. Help the shopkeeper determine the value of 'l' that maximizes the overall price of the N sweets. Input Format The first line contains a single integer N representing the total number of sweets. The second line contains two integers 'x' and 'y'. Output Format Print the value of 'l' that maximizes the total price, followed by the maximum possible total price of N sweets in a single line separated by space. Constraints 1 <= N <= 10^3 1 <=