You lost me somewhere.
I posted the official solution at dpaste : http://dpaste.com/1324320/
With an initial balance of 1000 and interest of 0.1 :
1) With the official solution, i find a minimal payment of $87.92 and a balance of -$0.05
2) With my code, i find a minimal payment of $87.92 and a balance of -$0.05
I dont really see how you get $87.19 ?
I also double-checked my answers for test cases.
I get the same minimal payment, but have a $0.01 difference on the final balance ($0.11 instead of $0.1 in case 1, and $0.11 instead of $0.12 in case 2).
For your info, this difference is down to the fact that the solution actually rounds everything before doing calculation (and more precisely, rounding the interest value before substracting it to the balance, line 39). If you get rid of this round() and just round the final answers (wich seems more logical), you find a final balance identical to my solution ($0.11 and $0.11).
From a theoretical and mathematical point of view, I dont see any differences between my solution and the official one. Thats why I posted.