Problem 2396. last n digit of a power function
Solution Stats
Problem Comments
-
1 Comment
I think the third test case is wrong. Anyone else has problem??
Solution Comments
-
1 Comment
Whoops. The answer needs to be a number, not a string.
-
1 Comment
great! well done
-
4 Comments
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)
http://docs.oracle.com/javase/1.5.0/docs/api/java/math/BigDecimal.html#BigDecimal(double)
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 :)
-
1 Comment
good effort!
Problem Recent Solvers24
Suggested Problems
-
1747 Solvers
-
231 Solvers
-
Fahrenheit to Celsius converter
482 Solvers
-
114 Solvers
-
Find the position of first minimum value in an integer array with numbers
172 Solvers
More from this Author6
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!