https://www.acmicpc.net/problem/2588
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int m=s.nextInt();
int num=m%10;
int a=num*n;
m/=10;
num=m%10;
int b=num*n;
m/=10;
num=m%10;
int c=num*n;
int sum=(a+b*10+c*100);
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.print(sum);
}
}