Company: Meesho_1aug
Difficulty: medium
Power limit Problem Description Given 2 resources with powers A and B respectively. At each second, you have to select one resource out of 2 to run the software. The power of the resource at the time of selection should be greater than 1. Every second, the power of the selected resource gets reduced by 2 and the power of unselected resource gets charged by 1. The software stops when at least one resource has 0 power. You are given integers A and B Find the maximum number of seconds your software can run if you select the resources optimally. Function description Complete the function powerLimit() . This function takes the following 2 parameters and returns the required answer. A Represents the power of the first resource B Represents the power of the second resource Input format Note: Use this input format if you are testing against custom input or writing code in a language where we don't provide boilerplate code The first line contains an integer A denoting the power of the first res