Gentoo Archives: gentoo-user

From: Michael Sullivan <msulli1355@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] program to solve assignment problem?
Date: Mon, 02 Nov 2009 23:00:00
Message-Id: 1257202794.14602.0.camel@camille.espersunited.com
In Reply to: Re: [gentoo-user] program to solve assignment problem? by Marcus Wanner
1 On Mon, 2009-11-02 at 17:48 -0500, Marcus Wanner wrote:
2 > On 11/2/2009 3:49 PM, Erik wrote:
3 > > Is there some simple little program to solve assignment problems?
4 > > Suppose that someone bought k meat (160), m fish (30) and n milk (15)
5 > > for 700. So it should solve the equation k * 160 + m * 30 + n * 15 =
6 > > 700. (A solution happens to be k = 4, m = 2, n = 0. An additional
7 > > condition could be that he bought at most 6 items; k + m + n <= 6. That
8 > > would eliminate solutions like k = 4, m = 0, n = 4.)
9 > >
10 > What?
11 >
12
13 Can't one do this kind of thing in python?

Replies

Subject Author
Re: [gentoo-user] program to solve assignment problem? Marcus Wanner <marcusw@×××.net>