<?php
$cups = array();
for($i=0; $i<100; $i++){
$cups[$i] = 0;
}
for($x=1; $x<100; $x++){
for($y=$x; $y<100; $y+=$x){
$cups[$y] = !$cups[$y];
}
}
$selected = array();
foreach($cups as $key => $value){
if($value == 1){
$selected[] = $key;
}
}
$sel_str = implode(', ', $selected);
echo $sel_str;
echo "\n\n\n\n";
foreach (explode(', ', '1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225') as $num) {
settype($num, 'integer');
echo decbin($num)."\n";
}
preferences:
36.43 ms | 402 KiB | 5 Q