Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from itertools import permutations
- s = set()
- dates = ['1720', '1727', '1747', '1828']
- for d in permutations(dates, r=2):
- numbers = list(d[0]+d[1])
- s = s.union(set(permutations(numbers)))
- n = len(s)
- print(f'{n} chances sur 100000000')
- print(f'{n/1000000}%')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement