I think the third test case is wrong. Anyone else has problem??
Whoops. The answer needs to be a number, not a string.
great! well done
Admittedly, I know very little about Java but I'm suprised this work since I can't find a constructor that takes a double. Only strings, byte patterns or random number generators. Care to explain?
There are a constructors for int and double: http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(int)
Oh yes, I missed that you were using BigDecimal instead of BigInteger.
i have a 25 sized solution but it doesnt accept since i used symbolic toolbox :)
Find the longest sequence of 1's in a binary sequence.
Reverse the vector
Rotate a Matrix by 90 degrees
07 - Common functions and indexing 1
Integer or Float?
Flip the right coin to survive!
Fill an array given a sum and array length values
Sum of Dividend Digits
Simulating the selection of a state with given probabilities
Sum of digit range
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