Wrong Answer Error

Everytime i try codechef i have the same problem again and again.
I tried inputting using input but then i get WA error
i changed it to sys.stdin.readline() again WA error
my answer is not wrong
i tried using the test cases and even made a few cases myself but still i get wrong answer error.
please help me.
say i am accepting input:
1 4
1 4 6

i use this:
test_cases = int(input())
for i in range(test_cases):
number_of_people = int(input())
distances = input()
distance_list = distances.split()

please help!

This is the right way to do it, but I hope you are indenting properly. Also, instead of the last two lines of your input taking, you should put it in one line as below:

distance_list = list(map(int, input().split()))

What you are doing right now gives you a list of strings instead of integers