Why is it failing one test case?
@Karanveer use long long int datatype as the distance can be quite large