Problem 42936. Project Euler: Problem 11, Largest product in a grid
Solution Stats
Problem Comments
-
9 Comments
The md5.update() seems to be broken. I ran the following code in the scratch pad.
------------------------------------------
md5.update(typecast(uint64(PE11(magic(10),4)),'uint8'))
assert(isequal(sprintf('%02X',typecast(md5.digest,'uint8')),...
'9260342934CE67F6A3E74F7EF9001460'))
------------------------------------------------
Then the output is as follows:
Unable to resolve the name 'md5.update'.
@Dong-hyun: there was a problem with the test suite hiding code from the solve page. There was setup code that was being suppressed from view, but was being run before each of the tests. Accordingly, the problem was still solvable, but could not be tested via the Scratch Pad.
I have copied the necessary setup code into each test case, so it should work for you now.
Note that the "rng default" line is needed for the first test case (as is included there) but not for the other two test cases (and is, therefore, not included there).
And, to clarify my comment regarding the Scratch Pad, the test cases need to be present in the Scratch Pad in the same order, due to the reliance upon seeding the random-number generation. I would recommend copying in all three in order before testing your solution.
Solution Comments
Show commentsProblem Recent Solvers97
Suggested Problems
-
2757 Solvers
-
2491 Solvers
-
8780 Solvers
-
263 Solvers
-
9756 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!