You are given an integer power and two integer arrays, damage and health, both of length
Bob is facing health[i] health and deals damage[i] points of damage to Bob every second.
Every second, Bob can choose one enemy to attack, reducing their health by power. An enemy is defeated once their health reaches
Return the minimum total damage inflicted on Bob before all enemies are eliminated.
Constraints:
power
damage.length health.length
damage[i], health[i]
You are given an integer power and two integer arrays, damage and health, both of length
Bob is facing health[i] health and deals damage[i] points of damage to Bob every second.
Every second, Bob can choose one enemy to attack, reducing their health by power. An enemy is defeated once their health reaches
Return the minimum total damage inflicted on Bob before all enemies are eliminated.
Constraints:
power
damage.length health.length
damage[i], health[i]