# Horse Racing Duals puzzle discussion

#376

there is an error it is looking for 47 but that would mean the 2 best horses for the dule would be “9999999” and “9999952” but there is no “9999952” in the list. I wrote code to test this. here it is::
li = []
w = 0
x = 0
y = 0
z = 0
run = 0

n = int(input())
for i in range(n):
pi = int(input())
li.append(pi)
w = “FALSE”
x = 0
y = 0
for i in li:
if i > x: x = i
y = y + 1

for i in li:
if i == x - 47: W = “TRUE”

z = n - y
print(“x=”,x,“y=”,y,“z=”,z,“IS THERE A 47 POINT SPREAD?”,w, file=sys.stderr)
print(x)

So either it is not explained properly as in they are not looking for “The difference D between the two closest strengths.” but rather they was them split by 2s and then to locate the closest set. This is either a mistake in the fin target witch is “111” by the way or a miss communication in the directions
AS PER PYTHON3

#377

You seem to be assuming that the strongest horse must be one of the racers. Is that requirement mentioned in the problem statement?

#378

just like a lot of other people i succeed in all the tests except horses in disorder.

i just now realised what the problem is. all horses probably have 0 pi (that’s why they are in disorder, all dead)

so your solution must allow for that

#379

finalement plutôt facile avec l’appel à une fonction builtin de python