Project Euler 185 - Number Mind

Official link: https://projecteuler.net/problem=185

Thought Process

This was a very fun problem!

I first tried a few semi-brute force backtracking algorithms and was able to solve the first case but the second case would've taken my code probably 1,000 years! 

I then decided to model it as an Integer Linear Programming problem 

Interactive Code

Interactive code is not suitable for this problem, some extra test case have been given above!