mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-23 04:16:33 +03:00
24 lines
773 B
Python
24 lines
773 B
Python
alf = "01234567"
|
|
nc = ["1", "3", "5", "7"]
|
|
cnt = 0
|
|
|
|
for a in alf[1:]:
|
|
for b in alf:
|
|
for c in alf:
|
|
for d in alf:
|
|
for e in alf:
|
|
w = a + b + c + d + e
|
|
if w.count("6") == 1:
|
|
if a == "6":
|
|
if b not in nc:
|
|
cnt += 1
|
|
elif e == "6":
|
|
if d not in nc:
|
|
cnt += 1
|
|
else:
|
|
mnc = w[w.index("6") - 1]
|
|
mxc = w[w.index("6") + 1]
|
|
if mnc not in nc and mxc not in nc:
|
|
cnt += 1
|
|
print(cnt)
|