The dog with the Nan weight seems to be used in the percentage calculation, but not in the average calculation. I noticed this in test cases 2 and 3, where the upper bound is 26 and the value 23.4 is within bounds
So, the 8th dog, with height 23.4 which has a Nan weight, is counted for the average, but not for the percentage. I also found it tricky, on what denominator to use on the percentage, it was not clear to me