You are not logged in. Please login at www.codechef.com 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

4★sorb1997
1509
accept rate: 10%

edited 01 Apr '18, 08:15

toggle preview
Preview

Follow this question

By Email:

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

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "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:

×3,762
×2,351
×552
×8

question asked: 01 Apr '18, 08:14

question was seen: 161 times

last updated: 01 Apr '18, 08:15