Advertisement
nq1s788

8 (один икс без count)

Jan 6th, 2024
1,089
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.74 KB | None | 0 0
  1. alph = 'ABCX'
  2. answ = 0
  3. for a in alph:
  4.     for b in alph:
  5.         for c in alph:
  6.             for d in alph:
  7.                 for e in alph:
  8.                     if a == 'X' and b != 'X' and c != 'X' and d != 'X' and e != 'X':
  9.                         answ += 1
  10.                     if a != 'X' and b == 'X' and c != 'X' and d != 'X' and e != 'X':
  11.                         answ += 1
  12.                     if a != 'X' and b != 'X' and c == 'X' and d != 'X' and e != 'X':
  13.                         answ += 1
  14.                     if a != 'X' and b != 'X' and c != 'X' and d == 'X' and e != 'X':
  15.                         answ += 1
  16.                     if a != 'X' and b != 'X' and c != 'X' and d != 'X' and e == 'X':
  17.                         answ += 1
  18. print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement