Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- a = int(input())
- b = int(input())
- c = int(input())
- d = int(input())
- ans = []
- if a != 0 and b != 0 and c!= 0 and d != 0:
- ans = [[max(a, b) + 1, 1], [1, max(c, d) + 1]]
- if a == 0:
- ans.append([1, c+1])
- elif b == 0:
- ans.append([1, d+1])
- elif c == 0:
- ans.append([a+1, 1])
- elif d == 0:
- ans.append([b+1, 1])
- elif a < b or c < d:
- ans.append([a+1, c+1])
- elif b < a or d < c:
- ans.append([b+1, d+1])
- x, y = min(ans, key = lambda z: z[0] + z[1])
- print(x, y)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement