Longer Line Problem. Methods
Здравейте, може ле някакви насоки какво ми куца в логиката, че не стигам повече от 60/100 ...
Моя код: https://pastebin.com/bh1R5ZbX
Задачата:
1.Longer Line
You are given the coordinates of four points in the 2D plane. The first and the second pair of points form two different lines. Print the longer line in format "(X1, Y1)(X2, Y2)" starting with the point that is closer to the center of the coordinate system (0, 0) (You can reuse the method that you wrote for the previous problem). If the lines are of equal length, print only the first one.
Input |
Output |
4 -1 2 -5 -5 4 -3 |
(4, -3)(-5, -5) |