Advertisement
Spocoman

02. Center Point

Jan 31st, 2022
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | None | 0 0
  1. import math
  2.  
  3. def solve(x, y):
  4.     return math.sqrt(math.pow(x, 2) + math.pow(y, 2))
  5.  
  6. x1 = float(input())
  7. y1 = float(input())
  8. x2 = float(input())
  9. y2 = float(input())
  10.  
  11. if solve(x1, y1) <= solve(x2, y2):
  12.     print(f"({math.floor(x1)}, {math.floor(y1)})")
  13. else:
  14.     print(f"({math.floor(x2)}, {math.floor(y2)})")
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement