Задание

Определите количество пятизначных чисел, записанных в пятеричной системе счисления, в записи которых ровно две цифры 4, и при этом никакая нечетная цифра не стоит рядом с цифрой 4.
Выберите код программы, который соответствует данной задаче.

  • from itertools import *
    k=0
    for x in product\('01234',repeat=5\):
    s=''.join\(x\)
    if s
    \[0\]
    !='0' and s.count\('4'\)==2 and '41' not in s\
    and '14' not in s \
    and '43' not in s and '34' not in s :
    k+=1
    print\(k\)
  • from itertools import *
    k=0
    for x in product\('01234',repeat=5\):
    s=''.join\(x\)
    if s.count\('4'\)==2 and '41' not in s\
    and '14' not in s \
    and '43' not in s and '34' not in s :
    k+=1
    print\(k\)
  • from itertools import *
    k=0
    for x in product\('012345',repeat=5\):
    s=''.join\(x\)
    if s.count\('4'\)==2 and '41' not in s\
    and '14' not in s \
    and '43' not in s and '34' not in s :
    k+=1
    print\(k\)