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
-
197 Solvers
-
510 Solvers
-
Back to basics 11 - Max Integer
723 Solvers
-
"Low : High - Low : High - Turn around " -- Create a subindices vector
414 Solvers
-
Count decimal digits of a number
194 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!