why↵
long long k =d ,cc=0 ;↵
while(n >=k) cc += (n/kk) ,k *=d; is wrong ↵
↵
while this is correct ↵
long long k =d ,cc=0 ;↵
while(n) cc +=n/dk , n /=d k ;
long long k =d ,cc=0 ;↵
while(n >=k) cc += (n/k
↵
while this is correct ↵
long long k =d ,cc=0 ;↵
while(n) cc +=n/