|
Post by Pure on May 27, 2005 21:43:33 GMT -5
Each week (Friday) I will post a puzzle and you guys will attempt to solve it! FIrst puzzle is:
One day, two brilliant mathematicians, Hamberg and Dodge, are walking down the street when Hamberg remarks that he does not know the ages of Dodge's three children. The following dialogue takes place.
Dodge: The product of their ages is 36
Hamberg: I still don't know their ages.
Dodge: The sum of their ages is equal to the number on that red house across the street.
Hamberg: I still don't know their ages.
Dodge: Oh, yes. The oldest is visiting her grandmother.
Hamberg: now I know.
What are the ages of Dodge's children?
|
|
|
Post by bcherry on May 27, 2005 22:26:00 GMT -5
uh, let's see....
factors of 36:
4, 9, 1 4, 3, 3 36, 1, 1 18, 2, 1 2, 2, 9 6, 6, 1 6, 2, 3 12, 3, 1 ... can't think of any more right now.
Ok, those add up to these:
14 10 38 21 13 13 11 16
Ok, so if he didn't know their ages after being shown the sum, the sum has to be 13 because that's the only one with two choices. If the "oldest" is visiting the grandmother, there has to be an "oldest" so that rules out 6, 6, 2 and they are:
9, 2, and 2!
|
|
|
Post by bfr on May 27, 2005 22:46:49 GMT -5
I've heard of that puzzle before....
|
|
|
Post by Pure on May 29, 2005 10:27:46 GMT -5
uh, let's see.... factors of 36: 4, 9, 1 4, 3, 3 36, 1, 1 18, 2, 1 2, 2, 9 6, 6, 1 6, 2, 3 12, 3, 1 ... can't think of any more right now. Ok, those add up to these: 14 10 38 21 13 13 11 16 Ok, so if he didn't know their ages after being shown the sum, the sum has to be 13 because that's the only one with two choices. If the "oldest" is visiting the grandmother, there has to be an "oldest" so that rules out 6, 6, 2 and they are: 9, 2, and 2! BCherry...you are... CORRECT! Nice work! Next week, you can choose to give the challenge or have me give the challenge...
|
|
|
Post by Vladik on Jun 2, 2005 21:49:27 GMT -5
Hey! WTF? I just noticed this.
|
|
|
Post by bcherry on Jun 2, 2005 23:23:30 GMT -5
uh, I have no challenge at this time, so you can go ahead and give one now.
|
|
|
Post by Vladik on Jun 3, 2005 16:01:53 GMT -5
Well, Pure is supposed to post the puzzles.
But you all could post "minipuzzles" if the original puzzles have been solved.
If Pure's original puzzle was too hard, he could either post a hint or a minipuzzle that's supposed to make us understand the original puzzle more clearly...
|
|
|
Post by Pure on Jun 4, 2005 8:13:18 GMT -5
uh, I have no challenge at this time, so you can go ahead and give one now. A little late, but here: A program in TI-BASIC (as in 83+/84+) simulates a loading bar before it starts. What is the code for the loading bar? You can use any labels or variables, as long as it works.
|
|
|
Post by bfr on Jun 4, 2005 11:40:18 GMT -5
You mean sort of like: ? No problem, but I'm not in the mood for BASIC. I might be up to it though....
|
|
|
Post by Vladik on Jun 4, 2005 15:58:18 GMT -5
I see you want to integrate a loading bar into your program.
This is a very poor decision.
Please reconsider, for this will decrease program speed by a great amount. (I'm talking about a NON-graphic loading bar. I guarantee that the graphic kind will be MUCH slower.)
And this is kind of easy, if you tell us the length of the bar and the height that you want it to be and where in the program you would want to integrate it.
And bfr; that IS what Pure want, I'm sure of it.
|
|
|
Post by bfr on Jun 4, 2005 18:25:16 GMT -5
Well, there are a couple of ways to indicate loading.
The most common way is shown in my previous post (or least one of the most common ways)
I'm, too lazy to post the code, but all you do is...simply fill each space up next to each other gradually. Not that hard. Maybe I'll post the code in my next post.
|
|
|
Post by bcherry on Jun 4, 2005 19:32:25 GMT -5
when you say "simulate" does that mean the loading bar doesnt actually mean anything, it is just there for looks? If so, then here is some code:
:For(X,1,50) :Line(X+10,10,X+10,20) :End
Of course assuming the window is correct etc. You can put whatever text ("Loading....") You want down. The loading bar is 10 pixels tall, and fills up to 50 pixels wide. Wait, here is something better:
:Line(9,22,62,22) :Line(9,22,9,8) :Line(9,8,62,8) :Line(62,8,62,22)
Then the rest above. Now you have a box around it!
|
|
|
Post by Vladik on Jun 4, 2005 20:20:32 GMT -5
Oh.
You want it to waste time, SIMULATING a loading bar while actually doing nothing.
In that case, bcherry's right...
|
|
|
Post by bfr on Jun 4, 2005 20:26:57 GMT -5
Eh...most people just say "Loading..." in their programs if something is going to take a while.
|
|
|
Post by Vladik on Jun 4, 2005 20:29:50 GMT -5
Pure said that he wants a loading bar BEFORE it starts.
This is a scanning waste of time!
|
|
|
Post by bfr on Jun 4, 2005 20:37:27 GMT -5
You're right, that would be kind of pointless. You could actually make it not pointless, but outputting "Loading..." is much easier.
|
|
|
Post by Vladik on Jun 4, 2005 20:41:33 GMT -5
Yes, that would be much easier and much more pointful.
|
|
|
Post by bfr on Jun 4, 2005 20:44:23 GMT -5
But maybe Pure intended it to be pointless.
|
|
|
Post by Vladik on Jun 4, 2005 20:46:13 GMT -5
In any case, it would be a waste of time and memory.
It would just make the program look more professional (and cheap)...
|
|
|
Post by bfr on Jun 4, 2005 20:54:26 GMT -5
|
|