Chef and Spooky Bottles
CodeChefOpen on judge ↗
Chef has bottles of several capacities. He likes to note down, for each bottle, those smaller amounts that he can use to exactly divide its contents. He calls these amounts "helper amounts". For example, the helper amounts of a 21 L bottle are 1 L (since he can use 21 of these to divide the contents), 3 L (he can use 7 of these), and 7 L (he can use 3 of these). Similarly, a 20 L bottle has helpe
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