public static int[] greedyMoneyChange(final int m[], int n)
    {
        final int k = m.length;
        final int[] num = new int[k];
        for (int i = 0; i < k; i++)
        {
            num[i] = n / m[i];
            n = n % m[i];
        }
        return num;
    }