Problem3113--除法[Dvision,UVa725]

3113: 除法[Dvision,UVa725]

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 0  Solved: 0
[Status] [Submit] [Creator:]

Description

编写一个程序,按照从小到大的顺序输出所有如下图所示的表达式:

其中,a~j中一个字母表示的0~9中的一个数字,每个数字只能用一次,第一个数字可以是0.

Input

多行,一行代表一个整数N(2≤N≤79),当这一行是0的时候表示输入结束

Output

按从小到大的顺序输出对于输入N的所有的数字对
输出格式为:
xxxxx / xxxxx = N
xxxxx / xxxxx = N
...
...
...
如果对于输入的整数N无解,输出“There are no solutions for N”。用空行分开两个不同的N的解。


Sample Input Copy

61
62
0

Sample Output Copy

There are no solutions for 61.


79546 / 01283 = 62
94736 / 01528 = 62

Source/Category