mirror of
https://github.com/Alexander-D-Karpov/scripts.git
synced 2024-11-26 05:23:42 +03:00
14 lines
349 B
Python
14 lines
349 B
Python
|
with open("9.txt") as f:
|
||
|
data = [list(map(int, x.split())) for x in f.read().splitlines()]
|
||
|
|
||
|
n = 0
|
||
|
for row in data:
|
||
|
mx = max(row)
|
||
|
if row.count(mx) == 1:
|
||
|
if [row.count(x) for x in row].count(1) != 6:
|
||
|
c = [x for x in row if x != mx]
|
||
|
if mx > sum(c) / len(c) * 3:
|
||
|
n += 1
|
||
|
|
||
|
print(n)
|