Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site zaphod.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!alberta!sask!zaphod!dkatz From: dkatz@zaphod.UUCP (Dave Katz) Newsgroups: net.puzzle Subject: Re: How to win a bottle of Champagne Message-ID: <262@zaphod.UUCP> Date: Tue, 28-May-85 02:32:17 EDT Article-I.D.: zaphod.262 Posted: Tue May 28 02:32:17 1985 Date-Received: Thu, 30-May-85 02:16:19 EDT References: <179@ubvax.UUCP> Reply-To: dkatz@zaphod.UUCP (Dave Katz) Organization: Develcon Electronics, Saskatoon, SK Lines: 35 Keywords: booze Summary: In article <179@ubvax.UUCP> frederic@ubvax.UUCP (Frederic Bach) writes: > There once were two brothers herding a flock of >sheep. One day, they decided to sell them all in >the market. Each beast was sold for as many dollars >as sheep there originally were in the herd. >The total amount of money was in $10 bills, plus >less than $10 in $1 bills. The elder brother proceded >to share it. He took a $10 bill, then gave one to >his brother, then took one again, and so on till >he turned out taking the last $10 bill ; he then >gave all of the $1 bills to the youngster, who burst >out : "Hey, but you've got #@% dollars more than I have ". > >How about now working out what he really said ? FOUR As described, there must have been an odd number of $10's. Since the total value is the square of the number of sheep, look for values of 2 <= y <= 11 for which int((y^2) / 10) is odd, (ignoring the trivial case of 1 since the problem implies there were at least $30). The only cases are 4^4=16, 6^6=36. All others are even. Further, (((n*10)+y)^2) = (n*10)^2 + 2ny + (y^2). Since int(((n*10)^2 + 2ny) /10 ) is always even, ((n*10)+y)^2 is odd in the second digit iff y^2 is odd in the second digit. This applies for all n | 0 <= n (there being a positive number of sheep). Hence the number of sheep must have been: (n*10+y | 0 <= n, y = 4 or y = 6) In either case, the value ends in 6 and the difference is four - Now, where is my bottle of champagne?