← RoseCode

ROSECODE 218

Prime change

sinan · Programming ·

There are some coins worth 1,2,5,11,23,47,101,211 and bills worth 503,1009,2003,5003,10007. In how many ways can you pay 12345, if you are allowed to use upto 47 coins? [My timing: 15s]