niromru

Стрижка и бритье

Dec 26th, 2020
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. a = list(map(int, input().split()))
  2. v = []
  3. mi = min(a)
  4. ch = -1
  5. if mi % 2 == 0:
  6.     ch = 1
  7. else:
  8.     ch = 0
  9. for i in a:
  10.     if ch == 1:
  11.         if i % 2 == 0:
  12.             v.append(i)
  13.     else:
  14.         if i % 2 != 0:
  15.             v.append(i)
  16. v = list(set(v))
  17. print(*v)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment