why it is not accepting the answer ;we cant make such small solutions we are not like professional coder
still something fishy with the 3rd problem, example:
x = uint64(321676750829977632);
num2str(x) -> 321676750829977600
rem(x,10) -> 0
euler003(x) -> 83653987
ok now, it seems this was only an issue with my matlab version (7.7) but was not present in the version running the solvers (which seems to have uint64 arithmetic supported!, man, I need an upgrade...)
You should pass the x values as a string. A double precision number cannot resolve all the digits that one needs to solve the test suite problems:
>> x = 321676750829977632;
>> x == x+1
I agree that there is an issue with the last test suite problem. passing it as a uint64 would work too.
Yep I got "Error: Out of memory. Type HELP MEMORY for your options." :-)
Check if sorted
Back to basics 21 - Matrix replicating
Check if number exists in vector
Get the elements of diagonal and antidiagonal for any m-by-n matrix
Number of Even Elements in Fibonacci Sequence
Find best placement for ordered dominoes (harder)
Getting the row and column location from a matrix
Is this is a Tic Tac Toe X Win?
Project Euler: Problem 10, Sum of Primes
Project Euler: Problem 6, Natural numbers, squares and sums.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office