Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- A = [randint(-100, 100) for i in range(25)]
- print(A) #для проверки
- count = 0
- countMax = -1
- for i in range(len(A)):
- if A[i] > 0:
- count += 1
- else:
- if countMax < count:
- countMax = count
- count = 0
- else:
- count = 0
- print(countMax)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement