Does r=uint64(308436464205151562) make sense? It seems like the argument to uint64 is a double precision number, so you have already lost the precision you are trying to gain by using uint64.
r=uint64(308436464205151562) outputs for uint64(r) 308436464205151562. However, r=308436464205151562 outputs for uint64(r) 308436464205151552. A very small loss in precision, but still a loss. The Challenge set has some numbers that use all the paint if full precision math was used. If residual paint was required as an output then full precision is needed. For solutions using p=p-2*r-1 the errors in r and p may cause issues.
Very novel input parameter adjustment to allow direct solution.
That's Muller's method which is more computationally realiable than Bhaskaracharya's.
Nice bisecting search method and anonymous function for clean appearance.
Determine whether a vector is monotonically increasing
It dseon't mettar waht oedrr the lrettes in a wrod are.
Sum all integers from 1 to 2^n
Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
Generate a random matrix A of (1,-1)
USC Fall 2012 ACM : Find Largest Water Concentration
GJam 2014 China Rd A: Library Sorting (Small)
Battleship - Seaman Level
GJam 2014 China Rd A: Rational Number Tree
Cody Matlab Version
Find the treasures in MATLAB Central and discover how the community can help you!
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