I,R=input,range J=lambda:map(int,I().split()) for _ in R(int(I())): D,A=J() X=list(J()) print(sum((X[d]*10//A+5)//10for d in R(D)))