We first convert to given base , then check if the converted number has two consecutive 0 s or not
< ? php function hasConsecutiveZeroes ( $ N , $ K ) { $ z = toK ( $ N , $ K ) ; if ( check ( $ z ) ) print ( " Yes " ) ; else print ( " No " ) ; }