-
Notifications
You must be signed in to change notification settings - Fork 2
savingforretirement
bradendubois edited this page Nov 8, 2021
·
8 revisions
ID: savingforretirement
Difficulty: 1.9
CPU Time: 1 second
Memory: 1024 MB
Since Bob saves Bs every year, he saves (Br - B) * Bs in total, making Alice's target that exact amount, plus 1. To get this, we can take the ceiling of this goal divided by how much she saves every year, As; this is the number of years Alice must save, so we can output this plus A.