1217. Minimum Cost to Move Chips to The Same Position Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 1217class Solution: def minCostToMoveChips(self, position: List[int]) -> int: a = sum(p % 2 for p in position) b = len(position) - a return min(a, b)