A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Send more money!
Joined: Feb 24, 2006
Mar 28, 2006 22:58:00
Komal is a freshman in the University of Delhi. She has spent all the money for the fall semester. She knows that her father is a puzzle fan. So she mails her father a puzzle as shown.
She knew her father should be able to resolve this puzzle easily and mail the MONEY to her. Do you know how much money she will be receiving from her father?
Life is a Game play it.
Joined: May 05, 2003
Mar 29, 2006 14:47:00
Assuming that it is a simple number substitution I would guess:
Joined: Mar 22, 2005
Mar 29, 2006 15:20:00
Let's see, for how many of you could it be a spoiler if I post Prolog code that solves it
smm :-X = [S,E,N,D,M,O,R,Y], Digits = [0,1,2,3,4,5,6,7,8,9], assign_digits(X, Digits), M > 0, S > 0, 1000*S + 100*E + 10*N + D + 1000*M + 100*O + 10*R + E =:= 10000*M + 1000*O + 100*N + 10*E + Y, write(X), nl. select(X, [X|R], R). select(X, [Y|Xs], [Y|Ys]):- select(X, Xs, Ys). assign_digits(, _List). assign_digits([D|Ds], List):- select(D, List, NewList), assign_digits(Ds, NewList).
Don't get me started about those stupid
subject: Send more money!
A Puzzle of Oranges
puzzle - find ages of her son
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015