dxnge

15

Dec 6th, 2021
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. from itertools import product
  2. cnt = 0
  3. for i in sorted(product('RANDO', repeat=4)):
  4.     if i[1] in 'AND' and i[-1] in 'OR':
  5.         cnt += 1
  6.     if ''.join(i) == 'NADO':
  7.         print(cnt)
  8.         break
  9.  
Advertisement
Add Comment
Please, Sign In to add comment