30 year awful loan. What is to be paid at the end of the loan? (Try 2)

This problem’s question: {\color{#D61F06}\text{This problem's question:}} What is to be paid at the end of the loan?

This is a very awful loan. One lump sum payment at the end of 30 years.

This problem was worked in cents. The amount borrowed is 100 cents ($1). Each month the following compounding formula is applied: p = p 103 100 p=\left\lceil p \frac{103}{100}\right\rceil . The answer is the result at the end of 360 months (30 years).

This problem can be easily solved in the Brilliant coding environment.

The reason for the second try: Brilliant set the answer to 0.


The answer is 4854918.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Kyle T
Jun 21, 2019

Woo first!
Nothing super confusing about this problem, just need to set it up correctly and itll do all the work for you

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<?php
$loan = 100;
$term = 360;
$rate = 1.03;

for($i=0;$i<$term;$i++){
    $loan = ceil($rate * $loan);
}
echo $loan; //4854918
?>

It was not meant to be hard. Try changing ceiling to round or floor and see what happens.

A Former Brilliant Member - 1 year, 11 months ago

ceil: 4854918
round: 4170631 (16% less than ceil)
floor: 3507325 (38% less than ceil, 19% less than round)
Thats a huge difference!

Kyle T - 1 year, 11 months ago

That was the point of my suggestion.

A Former Brilliant Member - 1 year, 11 months ago

The following is a list of the loan balances at the end of each of the 360 months. The last number is the answer to the problem.

{103, 107, 111, 115, 119, 123, 127, 131, 135, 140, 145, 150, 155, 160, 165, 170, 176, 182, 188, 194, 200, 206, 213, 220, 227, 234, 242, 250, 258, 266, 274, 283, 292, 301, 311, 321, 331, 341, 352, 363, 374, 386, 398, 410, 423, 436, 450, 464, 478, 493, 508, 524, 540, 557, 574, 592, 610, 629, 648, 668, 689, 710, 732, 754, 777, 801, 826, 851, 877, 904, 932, 960, 989, 1019, 1050, 1082, 1115, 1149, 1184, 1220, 1257, 1295, 1334, 1375, 1417, 1460, 1504, 1550, 1597, 1645, 1695, 1746, 1799, 1853, 1909, 1967, 2027, 2088, 2151, 2216, 2283, 2352, 2423, 2496, 2571, 2649, 2729, 2811, 2896, 2983, 3073, 3166, 3261, 3359, 3460, 3564, 3671, 3782, 3896, 4013, 4134, 4259, 4387, 4519, 4655, 4795, 4939, 5088, 5241, 5399, 5561, 5728, 5900, 6077, 6260, 6448, 6642, 6842, 7048, 7260, 7478, 7703, 7935, 8174, 8420, 8673, 8934, 9203, 9480, 9765, 10058, 10360, 10671, 10992, 11322, 11662, 12012, 12373, 12745, 13128, 13522, 13928, 14346, 14777, 15221, 15678, 16149, 16634, 17134, 17649, 18179, 18725, 19287, 19866, 20462, 21076, 21709, 22361, 23032, 23723, 24435, 25169, 25925, 26703, 27505, 28331, 29181, 30057, 30959, 31888, 32845, 33831, 34846, 35892, 36969, 38079, 39222, 40399, 41611, 42860, 44146, 45471, 46836, 48242, 49690, 51181, 52717, 54299, 55928, 57606, 59335, 61116, 62950, 64839, 66785, 68789, 70853, 72979, 75169, 77425, 79748, 82141, 84606, 87145, 89760, 92453, 95227, 98084, 101027, 104058, 107180, 110396, 113708, 117120, 120634, 124254, 127982, 131822, 135777, 139851, 144047, 148369, 152821, 157406, 162129, 166993, 172003, 177164, 182479, 187954, 193593, 199401, 205384, 211546, 217893, 224430, 231163, 238098, 245241, 252599, 260177, 267983, 276023, 284304, 292834, 301620, 310669, 319990, 329590, 339478, 349663, 360153, 370958, 382087, 393550, 405357, 417518, 430044, 442946, 456235, 469923, 484021, 498542, 513499, 528904, 544772, 561116, 577950, 595289, 613148, 631543, 650490, 670005, 690106, 710810, 732135, 754100, 776723, 800025, 824026, 848747, 874210, 900437, 927451, 955275, 983934, 1013453, 1043857, 1075173, 1107429, 1140652, 1174872, 1210119, 1246423, 1283816, 1322331, 1362001, 1402862, 1444948, 1488297, 1532946, 1578935, 1626304, 1675094, 1725347, 1777108, 1830422, 1885335, 1941896, 2000153, 2060158, 2121963, 2185622, 2251191, 2318727, 2388289, 2459938, 2533737, 2609750, 2688043, 2768685, 2851746, 2937299, 3025418, 3116181, 3209667, 3305958, 3405137, 3507292, 3612511, 3720887, 3832514, 3947490, 4065915, 4187893, 4313530, 4442936, 4576225, 4713512, 4854918}

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...