1551. Minimum Operations to Make Array Equal

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

Содержание

LeetCode problem 1551

class Solution:
    def minOperations(self, n: int) -> int:
        return sum(n - (i << 1 | 1) for i in range(n >> 1))