Cake Cutting
CodeChefOpen on judge ↗
Dattu is a young boy. He loves cake really much. In Dattu's country, cakes are always evenly divided between people. Dattu wants to know how many people he should invite to his party if he has a cake whose size is equal to a units and he wants each person to get exactly A/B units of cake. Note that Dattu doesn't take a piece for himself; in other words, the cake is only divided among the people h
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.
Sign in to chat with the tutor and save your progress.
Sign in to start