20240607 3038 - Easy - Array
https://leetcode.cn/problems/maximum-number-of-operations-with-the-same-score-i/description/
class Solution:
def maxOperations(self, nums: List[int]) -> int:
i, j = 0, 1
s = -1
ans = 0
while j < len(nums):
if s == -1:
s = nums[i] +nums[j]
elif s!= nums[i] +nums[j]:
break
ans += 1
i += 2
j += 2
return ans