Finding the perfect number

Anonymous User
2139

How do I solve this?
I kinda am confused if its a binary search problem of just have to precompute a vectors with numbers whose last digit is not 0?
image

Comments (2)