Tap here to switch tabs
Problem
Submissions

Problem: Minimum Operations to Make Elements Divisible by Three

Try to solve the Find Minimum Operations to Make All Elements Divisible by Three problem.

Statement

You are given an integer array nums. In one operation, you can add 11 to or subtract 11 from any element of nums.

Return the minimum number of operations needed to make all elements in nums divisible by 33.

Constraints:

  • 1≤1 \leq nums.length ≤50\leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Operations to Make Elements Divisible by Three

Try to solve the Find Minimum Operations to Make All Elements Divisible by Three problem.

Statement

You are given an integer array nums. In one operation, you can add 11 to or subtract 11 from any element of nums.

Return the minimum number of operations needed to make all elements in nums divisible by 33.

Constraints:

  • 1≤1 \leq nums.length ≤50\leq 50

  • 1≤1 \leq nums[i] ≤50\leq 50