Notes
This function is in beta test. Please help improve it in the issues
here.
Hints
Your answer may be identical to the JOJ answer in the first several lines.
However, the main problem you meet now is Time Exceeded. And the exit code of your program is -9, which should be 0.
Please double check your code to solve this problem and try again.
Your Answer
Please enter the monthly payment: Please enter the monthly payment: Please enter the monthly payment: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest rate: Please enter the interest
JOJ Answer
Please enter the monthly payment: Please enter the interest rate: Please enter the duration of the loan, in years: Month Principal Interest Balance ----- --------- --------- --------- 1020 2567.47 208.45 2567.47 1019 2374.67 401.25 4942.14 1018 2196.35 579.57 7138.50 1017 2031.42 744.50 9169.92 1016 1878.88 897.04 11048.80 1015 1737.79 1038.13 12786.59 1014 1607.30 1168.62 14393.89 1013 1486.60 1289.32 15880.49 1012 1374.97 1400.95 17255.46 1011 1271.72 1504.20 18527.17 1010 1176.22 1599.70 19703.40 1009 1087.90 1688.02 20791.29 1008 1006.20 1769.72 21797.50 1007 930.65 1845.27 22728.15 1006 860.76 1915.16 23588.91 1005 796.13 1979.79 24385.03 1004 736.34 2039.58 25121.38 1003 681.05 2094.87 25802.42 1002 629.91 2146.01 26432.33 1001 582.61 2193.31 27014.94 1000 538.86 2237.06 27553.80 999 498.39 2277.53 28052.19 998 460.97 2314.95 28513.16 997