1558. Minimum Numbers of Function Calls to Make Target Array

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 1558

class Solution:
    def minOperations(self, nums: List[int]) -> int:
        return sum(v.bit_count() for v in nums) + max(0, max(nums).bit_length() - 1)