2367. Number of Arithmetic Triplets Обновлено: 2024-03-12 1 мин Algorithms , LeetCode СодержаниеLeetCode problem 2367class Solution: def arithmeticTriplets(self, nums: List[int], diff: int) -> int: vis = set(nums) return sum(x + diff in vis and x + diff * 2 in vis for x in nums)