Problem 3717 · Medium

Minimum Operations to Make the Array Beautiful

Raise later elements step by step so each one is a multiple of its predecessor, keeping the cheapest chain of values.

Open the interactive visualisation