NeetCode #820LC-2530MediumGreedy
← Back to All Problems

#820 · #2530 · Maximal Score After Applying K Operations(执行 K 次操作后的最大分数)

📌 Problem Statement & Constraints

You are given an integer array nums and an integer k. In one operation, choose an index i, add nums[i] to your score, then replace nums[i] with ceil(nums[i] / 3). Return the maximum score after exactly k operations. Constraints: 1 <= nums.length <= 10^5, 1 <= nums[i] <= 10^9, 1 <= k <= 10^5.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!