#3512

Minimum Operations to Make Array Sum Divisible by K

newbie · 100 · lc easy +12 · 92.4% accepted · 324 likes · top 100%

Description

Given integer array nums and integer k, each operation decrements one element by 1.

Return the minimum number of operations needed to make the array\'s sum divisible by k.

Code

1
2
3