Created
November 12, 2024 21:59
-
-
Save denisdemaisbr/55995af2edefdf6e61b647168cf11371 to your computer and use it in GitHub Desktop.
gerador lotofacil #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
ini_set('memory_limit', '8196M'); | |
require 'combine.php'; | |
require 'stats.php'; | |
$range = range(1,22); | |
$full = array_combination(15, $range); | |
$qty = count($full); | |
$filter = []; | |
$index = -1; | |
for ($i=0; $i<$qty; $i++) { | |
$par = stats_par( $full[$i] ); | |
$impar = stats_impar( $full[$i] ); | |
$soma = stats_soma( $full[$i] ); | |
if (($par == 7 || $par == 8) && ($soma >165 && $soma <220)) { | |
$index++; | |
$filter[$index] = $full[$i]; | |
$filter[$index]['stats'] = " par:$par impar:$impar soma:$soma"; | |
} | |
} | |
shuffle($filter); shuffle($filter); shuffle($filter); | |
shuffle($filter); shuffle($filter); shuffle($filter); | |
shuffle($filter); shuffle($filter); shuffle($filter); | |
for($i=0; $i<64; $i++) { | |
printf( "$i - " . implode(",", $filter[$i]) . PHP_EOL ); | |
} | |
/* | |
output: | |
$ php lf15all.php | |
0 - 1,2,4,7,8,9,10,11,15,17,18,19,20,21,22, par:7 impar:8 soma:184 | |
1 - 1,2,3,5,7,9,10,11,13,14,16,18,20,21,22, par:7 impar:8 soma:172 | |
2 - 2,3,5,8,9,10,11,12,13,15,16,17,18,21,22, par:7 impar:8 soma:182 | |
3 - 1,4,5,6,8,9,10,11,12,13,16,18,19,21,22, par:8 impar:7 soma:175 | |
4 - 2,3,4,5,7,8,10,12,13,14,15,17,20,21,22, par:8 impar:7 soma:173 | |
5 - 2,5,6,7,8,9,10,12,13,14,15,17,19,20,22, par:8 impar:7 soma:179 | |
6 - 1,5,6,7,9,10,11,12,13,14,15,16,18,20,22, par:8 impar:7 soma:179 | |
7 - 1,3,5,6,8,9,10,12,13,14,15,16,18,19,21, par:7 impar:8 soma:170 | |
8 - 2,3,4,5,8,9,11,12,13,14,15,16,17,19,22, par:7 impar:8 soma:170 | |
9 - 2,3,6,7,8,10,13,15,16,17,18,19,20,21,22, par:8 impar:7 soma:197 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment