Exemple #1
0
function find_max_gap($N)
{
    if (!is_acceptable($N)) {
        return FALSE;
    } else {
        $bin_N = decbin($N);
        print 'N = ' . $N . ', bin N = ' . $bin_N . ', ';
        //print ( 'max gap (arr) = '    . find_max_gap_with_arr( $bin_N ). ', ' );
        //print ( 'max gap (regexp) = ' . find_max_gap_with_regexp( $bin_N ) );
    }
}
Exemple #2
0
 /**
  * @dataProvider provider_is_acceptable_n
  */
 public function test_is_acceptable_n($n, $expected)
 {
     $this->assertEquals($expected, is_acceptable($n));
 }