Problem 1300 · Medium
Choose an integer cap making the capped sum closest to the target, preferring the smaller cap on ties.
Open the interactive visualisation