Created
May 1, 2019 21:38
-
-
Save dbgarf/c29ae7d7a3bebc4887986c3f631f0948 to your computer and use it in GitHub Desktop.
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
$total = 1440; | |
$totalW = 0 <# 52 #>; | |
$totalB = 0 <# 8 #>; | |
for ($i = 0; $i -lt 1440) { | |
if ($totalW -eq $totalB) { | |
$i += 52; $totalW += 1 | |
} | |
else { | |
$i += 8; $totalB += 1 } | |
}; | |
# output results | |
$totalW; # 24 | |
$totalB; # 24 | |
$i; # 1440 | |
$total -eq ($totalW*52)+($totalB*8) # True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment