Problem 3512 · Easy

Minimum Operations to Make Array Sum Divisible by K

Each decrement lowers the sum by one, so the fewest decrements are the sum modulo k.

Open the interactive visualisation