Regarding the problem

Sir I am not getting the “Explanation” part of the problem.
I got what all input will be taken, but how we will estimate the minimum cost, I am not getting it. So please explain.

Hey @punetha.anmol001 ,
The question seems well explained can you please point out the part which you are having trouble in ?
Basically you have to buy cabs and rickshaws in a way (using c1 , c2 , c3 , c4) that you are able to meet all your rides and in minimum cost.

for ex : if you want to have 3 rides on a rickshaw and 2 rides on a cab
then the expression may be

min(3c1 + 2c1 , c2 + c2 , c4)

Hope it helps ! If you still have any doubts you can ask here
Happy Coding !

why is it c2+c2 here?

c2 is that you can have unlimited ride of either cab or rickshaw
so 1 c2 is for unlimited cab
and the other is for unlimited rickshaw

ok, got it. ll try it now

Sure . Give it a try !!
And mark the doubt as resolved if you have no further queries

Btw how can we store the integers denoting the cars/rickshaws? Should i use an array or sth?

You can use a array i dont think that will make any difference

Hey @punetha.anmol001 you have reopened your doubt. You have to mark it as resolved if it’s solved. If it’s not. Let me know.

Hey @punetha.anmol001 ,
Let me know if you have any other query regarding this problem .
I believe you have solved the problem now

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.