DEV Community

Discussion on: Daily Challenge #250 - Last Digit of a Large Number

Collapse
 
suhaskaranth profile image
suhas karanth

I saw a pattern with the last digit of the results when the numbers are raised to power incrementally.
Using that, I programmed the below solution in Java. However, it needs to be improved for larger numbers (may be using BigInteger in Java).

Solution + Pattern