You are given a nums and an integer k. You must perform the following operation exactly k times to maximize your total score:
m from nums.m from nums.m nums.m to your total score.
Your initial score is k times.
Constraints:
nums.length
nums[i]
k
You are given a nums and an integer k. You must perform the following operation exactly k times to maximize your total score:
m from nums.m from nums.m nums.m to your total score.
Your initial score is k times.
Constraints:
nums.length
nums[i]
k