We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
I agree with @kencluff but I think you can simplify your solution using pow method from Math class and casting the returning double to an integer instead of a for loop.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 17: More Exceptions
You are viewing a single comment's thread. Return to all comments →
I agree with @kencluff but I think you can simplify your solution using pow method from Math class and casting the returning double to an integer instead of a for loop.