iMatchstick - Matchstick Arithmetic Puzzle Solver and Beyond

Basic Problem to Solve

Digits composed of matchsticks are listed as following:

Digits

A, B, C are nonnegative integers and we have A, B < 100, and C < 200. Input an equation in forms of A+B=C or A-B=C with ONE matchstick misplaced like this:

Sample Puzzle

List ALL answer(s) to this puzzle to correct the equation by moving ONLY ONE matchstick.

[“49+68=117”]

Examples

Example 1

Example 2

Example 3

Example 4

Example 5

Optional Bonus Problem to Solve

Given the number of sticks to move, output all answers to a puzzle.

For example, given 2 as the number of sticks to move and

Sample Bonus Puzzle

the answers are: [“3+9=12”,”8+4=12”]

Given 3 as the number of sticks to move and the same puzzle, the answers are:

Notice