Commit 3d81210e authored by Alexandr Sitchenko's avatar Alexandr Sitchenko

delay

parent 4c2f6ec3
...@@ -39,17 +39,17 @@ $sumNumber = static function ($num) { ...@@ -39,17 +39,17 @@ $sumNumber = static function ($num) {
} }
return $sumCurrent; return $sumCurrent;
}; };
while ($currentLeft >= 0) { while ($currentLeft > 0) {
$sumCurrentLeft = $sumNumber($currentLeft); $sumCurrentLeft = $sumNumber($currentLeft);
while ($currentRight >= 0) { while ($currentRight >= 0) {
$sumCurrentRight = $sumNumber($currentRight); $sumCurrentRight = $sumNumber($currentRight);
if ($sumCurrentLeft === $sumCurrentRight) { if ($sumCurrentLeft === $sumCurrentRight ) {
//echo($current.'<br/>'); //echo($current.'<br/>');
++$ticketsHappy; ++$ticketsHappy;
} }
--$currentRight; --$currentRight;
} }
if ($currentRight < 0 && $currentLeft > 0) { if ($currentLeft > 0) {
$currentRight = 999; $currentRight = 999;
} }
--$currentLeft; --$currentLeft;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment