Open In App
Related Articles

Puzzle-61| Cake and my friend

Improve Article
Save Article
Like Article

Praveer ‘the most hungry guy‘ in college went to get some delicious cakes for his friends birthday. When he entered the famous shop “Taste the variety”, he was thrilled to see variety of cakes being displayed. He went to the seller and asked for cake. Seller told him that he has a very unique arrangement for cakes. He would be getting chunk of cakes pieces in boxes of 7, 11 or 17. Obviously he could purchase exactly 18 pieces by buying a box of 7 and a box of 11. Hearing this, he started imagining the largest number for which it is impossible to purchase exactly that number of pieces using above combination. Well as always, his hunger was deviating him from thinking, he asked for your help.


Solution:- The largest number that would be impossible to buy using above combination is 37. You can see he could form 7 using a single seven box, 25 using 7, 7 and 11. You have no combinations for number 30. Then numbers from 31 to 36 can be easily formed using above combination.For 37, he has no options fulfilling his needs. Further incrementing to 38, he could use 7, 7, 7, 17. Rest numbers above 37 can be formed using above combinations.

This puzzle is contributed by Ankur Chaudhary. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 18 Jan, 2023
Like Article
Save Article
Similar Reads