I am trying this logic but its not accepting . i dont know what is wrong with this code.
code of problem:
my solution:

First, you aren’t printing the output in the correct format, you should capitalize the first letter of your output. Second, you should take distances in their absolute value-
Here is your code getting accepted after the modifications-

1 Like

Thanks a lot.It accepted