Python 2, 129 126 bytes
def f(n,k,p=0):q=int('7367355777e0d93bf0fb'[n%10::10],16);return n and k*bin(p^q).count('1')+f(n/10,k,q)or k*bin(p).count('1')
def f(n,k,p=0):q=int('7367355777e0d93bf0fb'[n%10::10],16);return n and k*bin(p^q).count('1')+f(n/10,k,q)or k*bin(p).count('1')