Returns largest power of k that divides n !
function largestPowerOfK ( n , k ) { let vec = [ ] ; vec = primeFactorsofK ( k ) ; let ans = Number . MAX_VALUE ; for ( let i = 0 ; i < vec . length ; i ++ )