Sorry! I've got a maths degree (including studying linear optimisation) but, even if you'd succeeded in posting the full question (
https://www.theanswerbank.co.uk/Technology/Question1756987.html ), I can't make head nor tail of it in purely mathematical terms.
The only way that I could see to tackle it would be through making assumptions about the maximum possible values of N and R (because it seems unlikely that Shobitha would be considering millions of restaurants in thousands of locations) and then to create a program use iterative techniques for an exhaustive solution.
As it stands though, it just looks like a bloody silly question!
Sorry!