mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-22 11:56:33 +03:00
22 lines
504 B
Python
22 lines
504 B
Python
with open("9.txt") as f:
|
|
data = f.read().splitlines()
|
|
|
|
nums = [list(map(int, x.split())) for x in data]
|
|
cnt = 0
|
|
|
|
for en, row in enumerate(nums):
|
|
s = [i for i in range(len(row)) if row.count(i) == 1]
|
|
if s:
|
|
f = False
|
|
for i in s:
|
|
c = 0
|
|
for j in range(len(nums)):
|
|
if j != en:
|
|
c += nums[j].count(row[i])
|
|
if c == 50:
|
|
f = True
|
|
if f:
|
|
cnt += 1
|
|
|
|
print(cnt)
|