时间:2021-07-01 10:21:17 帮助过:10人阅读
$arr = array('0','0','0','0','0','0','0','0','0','0');
for ($i=0;array_sum($arr)<10;$i = $i+3){
if($i >=10) $i = $i-10;
$arr[$i] = 1;
echo $i+1 ."
";
}
$n = 10;
$i = 0;
while($n--) {
echo "$i
";
$i = ($i + 3) % 10;
}