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