- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
def foo(n):
f = True
k = n % 10
while n > k:
n //= 10
if n % 10 != k:
f = False
break
return f
array = [
[22, 14, 8, 14],
[22, 13, 70, 95],
[22, 12, 51, 10], # Для тестирования
[20, 11, 51, 56],
[49, 10, 36, 85]
]
f2 = True
for i in range(len(array[0])):
c = 0
for j in range(len(array)):
if foo(array[j][i]):
c += 1
if c > 3:
f2 = False
break
print("True" if f2 else "False")