Numbers = [10, 2, 3]
Maximum = 13
Array = [0 for i in xrange(0, Maximum + 1)]
Array[0] = 1
for CurrentNum in Numbers:
for Num in xrange(Maximum - CurrentNum, -1, -1):
if (Array[Num]):
Array[Num + CurrentNum] += Array[Num]
print Array[Maximum]
TnVtYmVycyA9IFsxMCwgMiwgM10KTWF4aW11bSA9IDEzCkFycmF5ID0gWzAgZm9yIGkgaW4geHJhbmdlKDAsIE1heGltdW0gKyAxKV0KQXJyYXlbMF0gPSAxCmZvciBDdXJyZW50TnVtIGluIE51bWJlcnM6CiAgICBmb3IgTnVtIGluIHhyYW5nZShNYXhpbXVtIC0gQ3VycmVudE51bSwgLTEsIC0xKToKICAgICAgICBpZiAoQXJyYXlbTnVtXSk6CiAgICAgICAgICAgIEFycmF5W051bSArIEN1cnJlbnROdW1dICs9IEFycmF5W051bV0KCnByaW50IEFycmF5W01heGltdW1d