3 ms·
Ha, yes. Reading the question, and indeed giving it any thought at all, were always the things that held me back in maths at school. Using cents and requiring >
by thom 12y ago
Ha, yes. Reading the question, and indeed giving it any thought at all, were always the things that held me back in maths at school. Using cents and requiring > 0:
user> (run* [q] (fresh [morning afternoon a b c d e f] (fd/in morning afternoon (fd/interval 0 3500)) (fd/in a b c d e f (fd/interval 0 26)) (fd/eq (< afternoon morning) (> morning 0) (> afternoon 0)
(= (+ a b) 10) (= (+ c d) 16) (= (+ e f) 26) (= (+ (* morning a) (* afternoon b)) 3500) (= (+ (* morning c) (* afternoon d)) 3500) (= (+ (* morning e) (* afternoon f)) 3500)) (== q [morning afternoon a b c d e f])))
Spoiler warning, scroll right: ([375 125 9 1 6 10 1 25])
- thom 12y agoAnd using computers instead of my head, that was another pitfall.
- patio11 12y agon.b. Correct answer. Took me 20 minutes with paper and pen: 5 minutes of noodling and 15 of constructing a table and winnowing it quickly using an insight about relatively prime numbers.
- alsocasey 12y agoThe only odd thing about this answer is that farmer 1 apparently decided to lower prices after selling 9 of his 10 chickens in the morning...