Something
public text v1 · immutable<?php
$a = array();
for ($i = 0; $i < 1000; $i++)
$a[$i] = true;
for ($i = 2; $i <= 1000; $i++)
for ($j = 0; $j < 1000; $j += $i)
$a[$j] = !$a[$j];
$open = array();
$c = 0;
for ($i = 0; $i < 1000; $i++) {
if ($a[$i]) {
$open[] = $i;
$c++;
}
}
echo $c . ": " . implode(', ', $open) . "\n";
?>