Advertisement
nq1s788

9

Mar 2nd, 2025 (edited)
248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=52180
  2. data = open('9.txt').readlines()
  3. a = []
  4. for e in data:
  5.     a.append(list(map(int, e.split())))
  6. answ = 0
  7. for e in a:
  8.     chet = []
  9.     nechet = []
  10.     for x in e:
  11.         if x % 2 == 0:
  12.             chet.append(x)
  13.         else:
  14.             nechet.append(x)
  15.     if len(set(e)) == 5 and len(chet) > len(nechet) and sum(nechet) > sum(chet):
  16.         answ += 1
  17. print(answ)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement