题目描述
题目链接:https://leetcode-cn.com/problems/three-consecutive-odds/
解题思路
直接遍历就完事了
class Solution:
def threeConsecutiveOdds(self, arr: List[int]) -> bool:
for i in range(len(arr)-2):
if(arr[i]%2==1 and arr[i+1]%2==1 and arr[i+2]%2==1):
return True
return False