← All problemsSign in

Mausil and his K communities

Mausil is a real estate agent, belonging to Pajal. He has a plan to build a series of $M$ buildings in Pajal and for this he found a land which can accommodate $M$ buildings in a row one after another. The rule of the Pajal government is that no building in Pajal can have more than $N$ floors. Based on a few factors like cost of the land, water resources etc. the cost of constructing a building is

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start