python最后一个测试点提示答案错误,各位老哥帮忙看下
N,M = map(int,input().split(" ")) for i in range(N): sum =0 num = 0 ipt_list = list(map(int,input().split(" "))) sort_list = sorted(ipt_list[1:]) for k in sort_list: if 0<=k<=M: pass else: sort_list.remove(k) for j in sort_list[1:-1]: sum = sum + j num += 1 sum = (sum/num + ipt_list[0])/2 sum = float(sum) a,b = str(sum).split(".") if int(b[0])>=5: a = int(a)+1 print(a)