package 第三章;
import java.util.Scanner;
public class 竖式问题 {
public static void main(String[] args) {
// TODO Auto-generated method stub
String s;
Scanner in=new Scanner(System.in);
s=in.next();
for(int abc=100;abc<=999;abc++) {
for(int de=10;de<=99;de++) {
int x=abc*de;
int y=abc*(de%10);
int z=abc*(de/10);
String buf;
buf=x+""+y+z+abc+de;
int ok=1;
for(int i=0;i<buf.length();i++)
{
if(!s.contains((buf.charAt(i))+""))
{
ok=0;
break;
}
}
if(ok==1)
{
System.out.println(s+" "+abc+" "+de);
}
}
}
}
}
import java.util.Scanner;
public class 竖式问题 {
public static void main(String[] args) {
// TODO Auto-generated method stub
String s;
Scanner in=new Scanner(System.in);
s=in.next();
for(int abc=100;abc<=999;abc++) {
for(int de=10;de<=99;de++) {
int x=abc*de;
int y=abc*(de%10);
int z=abc*(de/10);
String buf;
buf=x+""+y+z+abc+de;
int ok=1;
for(int i=0;i<buf.length();i++)
{
if(!s.contains((buf.charAt(i))+""))
{
ok=0;
break;
}
}
if(ok==1)
{
System.out.println(s+" "+abc+" "+de);
}
}
}
}
}