Company: amazon_23april
Difficulty: medium
Code Question 2: Amazon Eco-Friendly Product Ratings Imagine you\'re a seller on Amazon, specializing in eco-friendly home products. Each of your items is rated by customers based on its quality and environmental impact. The overall qualityScore of your products is determined by the maximum possible sum of consecutive ratings. To improve the qualityScore of your products and attract more customers, you are given with an integer impactFactor and the following two strategies: Amplify Ratings: Select a contiguous segment of ratings and amplify them by multiplying each rating in that range by impactFactor. Adjust Ratings: Select a contiguous segment of ratings and adjust them by dividing each rating in that range by impactFactor. Note: When applying the second strategy i.e., Adjust Ratings: For dividing positive ratings, use the floor value of the division result and for dividing negative ratings, use the ceiling value of the division result. Input Format The first line contains an integer