Mortgage
CodeChefOpen on judge ↗
Alexey is buying a new apartment! To pay for it, he is going to take one or more loans. There are $n$ banks in the city. The $i$-th bank offers loans up to $s_i$ rupees with a daily compound interest rate of $p_i$. He gets all the loans on Day 0. Thereafter, on each day, Alexey can afford to spend at most $t$ rupees on repaying the loans (and the interest!). He wants to finish repaying all the l
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start