Digit DP - Preparation to IOI Part 5