![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programming Guru
![]() |
Maths/Programming challenge
A chap came into work this morning with a puzzle for us to solve, here it is
G G J D G F F G G G P B F F G G B D G F F ----------------- Z N Y H P B G standard maths where you add down the coloum etc etc but each lettar is a number between 0 and 9. I dont no the answer myself (gonna work it out lunch time) just though you lot might want to have a go at it. I am currently writing a program to solve the problem as well.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#2 |
|
Programmer
|
can you please provide more details, because how can it be 3G = Z, and at the same time 3G = N. This is possible only when Z and N are equal.
__________________
countdown++; |
|
|
|
|
|
#3 |
|
Programmer
Join Date: Jun 2005
Location: |\|[][]B |_4|\|D
Posts: 41
Rep Power: 0
![]() |
Y-1
G-2 B-3 D-4 F-4 J-5 Z-6 H-6 N-7 P-8 |
|
|
|
|
|
#4 |
|
Programming Guru
![]() |
Dragon its wrong and to HeX dont you remember basic maths?
1 9+
2 4
------
4 39+4 = 13 carry the 1 over to the other side? remember that stuff? Dragon you can only use 1 number once eg all g's are 4 so 4 cannot be used for any other letter.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
#5 |
|
Programmer
|
D=1
G=2 B=3 F=4 Y=5 Z=6 N=7 P=8 J=9 H=0 That was a fun way to start the day! Thanks Berto! ![]() (FYI it's probably easier to just do the logic and write it out on paper than to write a program for it, it's not very hard really )
__________________
I can pick my friends. And I can pick my nose. So, why can't I pick my friend's nose? |
|
|
|
|
|
#6 |
|
Programmer
Join Date: Jun 2005
Location: |\|[][]B |_4|\|D
Posts: 41
Rep Power: 0
![]() |
ye i was doing it in my head, i thought that i might have had to use each one once but i tried to just get an answer down
![]() |
|
|
|
|
|
#7 |
|
Hobbyist Programmer
|
one thing i noticed is that "J" can be anything really. So "Z", "N" and "Y" can be anything too. (or maybe im wrong)
For the rest, I just finished my math exam today so maybe next year ![]() But i like these kind of problems, good logical programming practice. errr...sort of |
|
|
|
|
|
#8 | |
|
Programming Guru
![]() |
Quote:
Unfortunatly i think you are wrong as i have only found 1 answer to the question, and so therefore only 1 number for each letter.
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
|
|
|
#9 |
|
Programmer
|
Well, the fact that you found only one solution doesn't mean there aren't more. That doesn't mean I don't agree with you though. There's only one solution. It rests mostly on the fact that P must equal 8. That established, 8 plus 2D must equal one of the other remaining digits excluding the carry it creates. All that remain at that point are 0, 1, 5, 7, and 9. Even trial-and-error is fast enough to show that D then must equal 1 and H equal 0. The next line up does the same thing only with J = 9 and Y = 5, since those are the only tho remaining digits that can be made to work around the other numbers (which sum up to 6 [3 + 2 + 1carry]).
..ok, so maybe this isn't perfectly clear after all, but there's no need to go overboard explaining it, so ill stop with a simple: Yes, Berto, there's only one solution. :p
__________________
I can pick my friends. And I can pick my nose. So, why can't I pick my friend's nose? |
|
|
|
|
|
#10 |
|
Programming Guru
![]() |
well G has to be less than or equal to 3 - as 3G < 9
and it cant equal 0 as then Z would equal Zero. 3 numbers multiplied between 0 and 9 whoms answer is greater then 10 there are only 4 and 7 you can use (12 and 21) there is no 3 answer so g has to equal 2 or 3 and it just goes on from there, i tried bopth 4 and 7 and only one fo them works ![]()
__________________
"Put your hand on a hot stove for a minute, and it seems like an hour. Sit with a pretty girl for an hour, and it seems like a minute. THAT'S relativity." - Albert Einstein |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|