Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/python
- import random
- import collections
- Z = 3
- A = 4
- counter = collections.Counter()
- s = random.randint(0,A-1)
- for i in range(1,1000000):
- u = random.randint(0,A-1)
- r = u + s
- while r >= Z:
- r -= Z
- counter[r] += 1
- s = r
- for i in range(0,Z):
- print (i, counter[i])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement