# 9(20) РТ

user_8840555 avatar
user_8840555
python
06/13/2023 10:25 AM
580 B
18
Indexable
f = open(r'C:\Users\SnowDrit\Downloads\9\Новый текстовый документ.txt')
c = 0
for s in f:
    a = list(map(int, s.split()))
    if len(set(a)) == 5:
        ch = []
        nc = []
        for x in a:
            if x % 2 == 0:
                ch.append(x)
            else:
                nc.append(x)
        if len(ch) < len(nc) and sum(ch) > sum(nc):
            c += 1
print(c)
# 9(20) РТ
Editor is loading...