Help for this page

Select Code to Download


  1. or download this
    sub is_fibo {
      $_=pop;$n=0;{/^|(.)\1*/g?$n^($c=length$&)?0:($n=1-$c+pos,redo):$n>2}
    }
    
  2. or download this
    sub is_fibo {
      $_=pop;$n=1;{/(.)\1*/g?$n^($c=length$&)?0:($n=1-$c+pos,redo):$n>2}
    }
    
  3. or download this
    sub is_fibo {
       $_=pop;$n=0;$p=1;{/(.)\1*/g?pos^$n?0:($n+=$p+1,$p=pos,redo):$p>2}
    }
    
  4. or download this
    sub is_fibo {
      $n=0;pop=~/^((.)(??{"\Q$2"x$n})(?!\2)(?{$n=-++$n+pos})){3,}$/
    }