All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars
 perplexus dot info

 Fiction Novel And Science Book Problem (Posted on 2006-06-20)
A Science book and a Fiction novel are available from a wholeseller. Each costs an integer number of dollars. The cost of 620 copies of the Fiction novel is greater than that of 340 copies of the Science book but less than that of 341 copies of that book.

Would \$700 be enough for a retailer to purchase 11 copies of the Science book and 5 copies of the Fiction novel?

 See The Solution Submitted by K Sengupta No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
 another brute force | Comment 2 of 5 |

CLS
FOR s = 1 TO 200
low = 340 * s + 1: high = 341 * s - 1
highF = INT(high / 620)
lowF = -INT(-low / 620)
IF highF >= lowF THEN
FOR f = lowF TO highF
PRINT f; s; 11 * s + 5 * f,
NEXT
PRINT
END IF
NEXT

finds

28  51  701
39  71  976
45  82  1127
50  91  1251
56  102  1402
61  111  1526
62  113  1553
67  122  1677
72  131  1801
73  133  1828
78  142  1952
79  144  1979
83  151  2076
84  153  2103
89  162  2227
90  164  2254
94  171  2351
95  173  2378
96  175  2405
100  182  2502
101  184  2529
105  191  2626
106  193  2653
107  195  2680

so nothing less than 701 will do.

 Posted by Charlie on 2006-06-20 10:27:07

 Search: Search body:
Forums (0)