We first convert to given base , then check if the converted number has two consecutive 0 s or not
function hasConsecutiveZeroes ( N , K ) { let z = toK ( N , K ) ; if ( check ( z ) ) document . write ( " " ) ; else document . write ( " " ) ; }