t=int(input()) for i in range(t): d,a=map(int,input().split()) x=list(map(int,input().split())) print(*[(((v*10)//a)+5)//10 for v in x])