|
|
|
|
|
by bjourne
1515 days ago
|
|
To be fair, that is not that difficult to accomplish in Python either: from ortools.sat.python.cp_model import *
m = CpModel()
a, b, c, d, e = [m.NewIntVar(0, 100, '') for _ in range(5)]
m.Add(a*50 + b*25 + c*10 + d*5 + e*1 == 100)
s = CpSolver()
s.Solve(m)
print([s.Value(x) for x in [a, b, c, d, e]])
|
|