Help me solve this problem using DP.
Hint- a Number is divisible by 8 only if its last three digits form a number that can be divided by eight after that you can apply brute force.
Didn’t he say DP? The brute force solution is easy.
1 Like