← Questions

Price a macaron order with set discounts

0
OpenAICodingLast asked Oct 2026

A coding interview question asked in OpenAI's agentic coding (beta) round, last asked Oct 2026. It tests greedy, simulation and math.

A bakery sells macarons in at most five flavors, all at the same unit price. The baker packs an order into sets: a set holds at most one macaron of each flavor, and the baker builds it by taking one macaron from every flavor that still…

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • OpenAI · Agentic coding (beta) · Last asked Oct 2026An existing codebase and changes too large to write by hand; you work through them with an AI coding agent · An AI coding agent is expected

What it tests

greedy · simulation · math

Your code and the AI tutor open when you unlock this question.