← All problemsSign in

Junior_chef and cakes

Junior_chef is very fond of cakes. But as they aren't good for his health, chef doesn't wants him to access the cakes easily. So he has devised a game for him. Chef has rectangular pieces of cakes and the length of each cake is L cm. The cake can only be cut at certain points. Junior_chef is needed to calculate the number of 'good' pieces. A 'good' piece is the one which, after cutting the cake at

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