211. Level Up! What's My New Stats?
Easy · Math
When a hero levels up, their stats grow! Given `base_hp`, `base_atk`, and `levels_gained`, return a dict (object) with new stats. Each level adds 10 to HP and 2 to attack.
Examples
Example 1
Input: base_hp=100, base_atk=10, levels_gained=3
Output: {"hp":130,"atk":16}
Explanation: 3×10=30 HP gained, 3×2=6 ATK gainedConstraints
- 1 ≤ base_hp ≤ 1000, 1 ≤ base_atk ≤ 100, 1 ≤ levels_gained ≤ 50