Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import randint
- a = [randint(1, 1000) for i in range(1000)]
- count = 0
- n = len(a)
- for i in range(n):
- for j in range(i + 1, n):
- if (a[i] * a[j]) % 7 == 0:
- count += 1
- print(count)
Advertisement
Add Comment
Please, Sign In to add comment