PHP数三退1

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-13 10:49:37990browse

PHP数3退1

<?php$sum = 10;for ($i = 0; $i < $sum; $i++){                $arr[$i] = true;                        }          $count = count($arr);          $io = 0;          $index = 0;        while($count > 1){                if($arr[$index]==true){                        $io++;                        if($io==3){                                $count --;                                $io = 0;                                $arr[$index]=false;                        }                }                $index ++;                if($index==count($arr)){                        $index = 0;                }        }        for( $i=0; $i<count($arr); $i++){                if($arr[$i]==true){                        print_r($i);                }        }?>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn