def calculate_wind_force(A, rotations): return round(rotations / A) def main(): T = int(input()) for _ in range(T): D, A = map(int, input().split()) rotations = list(map(int, input().split())) for rotation in rotations: print(calculate_wind_force(A, rotation), end =' ') print() if __name__ == "__main__": main()