You are not logged in. Please login at to post your questions!


How do I solve the problem Nested Candy Boxes(AMBOXES) from CodeChef?

I was trying to solve this problem but could not get much intuition to proceed. This is what I thought so far : Try traversing all the levels, compare the maximum number of candies on that level, with the required number of candies, if the maximum number of candies on that level exceeds the number required, obtain the answer by dividing it with number of candies each box contains on that level. But I am not sure if my approach is correct, can anyone help me out with this? I tried looking at the successful submissions but no luck.

asked 01 Apr '18, 08:14

sorb1997's gravatar image

accept rate: 10%

edited 01 Apr '18, 08:15

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 01 Apr '18, 08:14

question was seen: 161 times

last updated: 01 Apr '18, 08:15