Advertisement
Guest User

Untitled

a guest
May 25th, 2022
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. from itertools import permutations
  2.  
  3. s = set()
  4. dates = ['1720', '1727', '1747', '1828']
  5. for d in permutations(dates, r=2):
  6.   numbers = list(d[0]+d[1])
  7.   s = s.union(set(permutations(numbers)))
  8. n = len(s)
  9.  
  10. print(f'{n} chances sur 100000000')
  11. print(f'{n/1000000}%')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement