ROSECODE 009
Prime Cryptarithm
The following cryptarithm is a multiplication problem that can be solved by substituting digits from a specified set of
* * *
x * *
----------
* * * *
* * * *
----------
* * * * *
Write a program that will find all solutions to the cryptarithm above for any subset of digits from the set
Sample Run
ENTER A SET OF DIGITS:
2 2 2
x 2 2
-----------
4 4 4 <3 more not shown>
4 4 4
------------
4 8 8 4
The number of unique solutions =
Test your program with the prime digits
Source:1993 USACO Qualifying Round 1