by adrianmonk · 6y ago · 0 comments
Of course we all chose $100/day. Then she told us it was too bad we didn't take the other option, because we would have been multi-billionaires.
[...Array(31).keys()]
.map(num => Math.pow(2,num))
.reduce((total,num) => total + num)
/ 100
$21,474,836.47or since the sum is equal to the next sequential (2 to power of n+1) minus 1 cent => 2^31 - 1 = $21,474,836.47