You are on page 1of 1

#include <vector>

#include <cmath>
#include <algorithm>
#include <numeric>

using namespace std;


void howChangeNumbers(vector<unsigned int> coins, vector<unsigned int>& Changes)
{
for(int i = 2; i < coins.size(); i++)
{

}
}

unsigned long long countChange(const unsigned int money, const std::vector<unsigned


int>& coins) {

if(money == 0) return 1;

int counter, minNcap = 0;


vector<unsigned int> workCoins = coins;
vector<unsigned int> howChange;

sort(workCoins.begin(), workCoins.end());
minNcap = floor(money / workCoins[0]);
howChange.push_back(0);
howChange.push_back(minNcap);

if(lcm(workCoins[0], workCoins[1]) <= money) {


howChange.push_back(1);
howChange.push_back(lcm(workCoins[0], workCoins[1])/workCoins[1]);
}
else {
howChange.push_back(0);
};
howChangeNumbers(workCoins, howChange);

return counter;
}

You might also like