For the bonus question (on OSX):
words= textread('/usr/share/dict/words','%s');
for k=1:numel(words)
wordprod(k) = word_product(words{k});
end
[~,i] = min(abs(wordprod-1000000));
words{i}
wordprod(i)
% curing with word product of 1000188
For the bonus question, we can rule out any number that has a prime factor greater than 26 (z). The product found by Jason Friedman is the first number greater than 10^6 that does not have such a prime factor. The product 999856 is the largest number less than 10^6 to be part of a possible solution.
I like playing with strings and ASCII table ;)
Everett appears to miss the fact that 1000000 has no prime factors above 26, and Jason's dictionary doesn't seem to include obsolete words. 'tetty' scores a perfect 1000000.
Well, if you happen to know someone named 'BettyJ', thus a first name of Betty, last initial J, this works: word_product('BettyJ').
Could you send me the answer?
I had benn worked for 1 week but Icouldnt find answer. İf anyone solves Please send answer. Really I need it.
Nice problem
Can you give me a hint on how to program the bonus question? I used factor but that is not a good way.
easy ;)
'curing' returns 1000188.
Closest 10 words are 'curing', 'Nicaragua', 'comers', 'Moors', 'rooms', 'banquet', 'Arkansas', 'sulks', 'alkaline' and 'Canaveral'.
Words that make 1000,000, tetty and typey apparently, :)
Very clever way of converting to a number
closest I can get is 'curing', 188 away.
'god' equals 420.
large but working ;-)
'j' corresponds to 10 according to the code above so, the word that gives exaclty 1E+6 is 'jjjjjj'
% word_product('jjjjjj')=1E+6
I don't think that 'jjjjjj' is really a word...
Find relatively common elements in matrix rows
873 Solvers
2004 Solvers
220 Solvers
329 Solvers
Rotate and display numbered tile
239 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!