#include<stdio.h>
#include<string.h>
int main()
{
int i, ok, abc, de, x, y, z, count;
char s[20], buf[99];
//printf("%c\n", 999);?的ASCII码是999.
while(scanf("%s", s) == 1)
{
count = 0;
for(abc = 111; abc <= 999; abc++)
for(de = 11; de <= 99; de++)
{
x = abc*(de%10); //x存储与各位相乘的结果
y = abc*(de/10); //y存储与市十位相乘的结果
z = abc*de; //z存储最终结果
sprintf(buf, "%d%d%d%d%d", abc, de, x, y, z);
ok = 1;
for(i = 0; i < strlen(buf); i++)
if(strc
hr(s, buf[i]) == NULL)//如果在s中buf[i]不存在,ok置0
ok = 0;
if(ok)
{
printf("<%d>\n", ++count);
printf("%5d\nX%4d\n-----\n%5d\n%4d\n-----\n%5d\n\n", abc, de, x, y, z);
}
}
printf("The number of solutions = %d\n", count);
}
return 0;
}