package leetcode;

/**
 * https://leetcode.com/problems/minimum-moves-to-equal-array-elements/
 */
public class Problem453 {
    public int minMoves(int[] nums) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem453 prob = new Problem453();
        System.out.println(prob.minMoves(new int[]{1, 2, 3})); // 3
    }
}

package leetcode;

/**
 * https://leetcode.com/problems/minimum-moves-to-equal-array-elements/
 */
public class Problem453 {
    public int minMoves(int[] nums) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem453 prob = new Problem453();
        System.out.println(prob.minMoves(new int[]{1, 2, 3})); // 3
        System.out.println(prob.minMoves(new int[]{1, 2, 3})); // 6
        System.out.println(prob.minMoves(new int[]{1, 2, 3, 4, 5})); // 10
    }
}

Update problem 453