题解 | #数组中只出现一次的数(其它数出现k次)#
数组中只出现一次的数(其它数出现k次)
http://www.nowcoder.com/practice/5d3d74c3bf7f4e368e03096bb8857871
class Solution: def foundOnceNumber(self , arr , k ): for i in arr: if arr.count(i) == 1: return i
数组中只出现一次的数(其它数出现k次)
http://www.nowcoder.com/practice/5d3d74c3bf7f4e368e03096bb8857871
class Solution: def foundOnceNumber(self , arr , k ): for i in arr: if arr.count(i) == 1: return i
相关推荐