【牛客】牛牛算数
题目描述:
给你一个含有n个元素的数组arr[i],请你告诉牛牛这个数组的中位数大还是平均数大,如果中位数更大输出1,如果平均数更大输出-1,如果中位数和平均数相等输出0
代码:
#
#
# @param arr int整型一维数组
# @return int整型
#
class Solution:
def Answerofjudge(self , arr ):
# write code here
count=len(arr)
ave=sum(ar
原创
2020-08-15 22:26:32 ·
231 阅读 ·
0 评论