#
# 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可
#
# 
# @param arr int整型一维数组 
# @param k int整型 
# @return int整型
#
class Solution:
    def foundOnceNumber(self , arr: List[int], k: int) -> int:
        # write code here
        a = dict()
        for i in arr:
            if i not in a:
                a[i] = 1
            else:
                a[i] += 1
                if a[i] == k:
                    del a[i]
        for i in a.keys():
            return i