Candies and Milestones
CodeChefOpen on judge ↗
Little Pratya loves collecting candies and she also likes playing games :). Today Pratya is travelling in bus and she has a bag full of N candies. She looks outside the window and notices milestones with numbers written on them. She decides to play a game. She wants to select some initial non-zero number of candies from the bag and call it her collection of candies. When she sees a milestone on t
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