Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nums = [[0, 0], [0, 0]]
- count = 0
- n = int(input())
- a = int(input())
- for i in range(n - 1):
- nums[a % 2][not bool(a % 3)] += 1
- a = int(input())
- count += nums[not a % 2][not a % 3]
- if not a % 3:
- count += nums[not a % 2][1]
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement