Sponsored
Use these hints if you're stuck. Try solving on your own first.
How to compute all digits of the number ?
Use modulus operator (%) to compute the last digit.
Generalise modulus operator idea to compute all digits.
Solve with full IDE support and test cases