Problem 2554 · Medium
Pick the smallest allowed integers in order until the next one would exceed the sum limit.
Open the interactive visualisation