Can anybody tell me where I have made mistake? p.s. How can I use priority queue in it? asked 25 Jul '15, 09:50

You can have a look at My solution using priority queue. Also my binary search approach is here. answered 25 Jul '15, 10:17
Thank you for your reply. I saw your binary search approach. My approach also looks same. You generated the amount of prata using a formula. I used an iterative approach. But it gives the same thing. Where have I made mistake?
(25 Jul '15, 18:29)
