Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #https://inf-ege.sdamgia.ru/problem?id=52180
- data = open('9.txt').readlines()
- a = []
- for e in data:
- a.append(list(map(int, e.split())))
- answ = 0
- for e in a:
- chet = []
- nechet = []
- for x in e:
- if x % 2 == 0:
- chet.append(x)
- else:
- nechet.append(x)
- if len(set(e)) == 5 and len(chet) > len(nechet) and sum(nechet) > sum(chet):
- answ += 1
- print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement