Leetcode Problem Reverse Annuity