https://www.acmicpc.net/problem/2588
#include <iostream>
using namespace std;
int main() {
int n,m;
cin >> n >> m;
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);
cout << a << "\n";
cout << b << "\n";
cout << c << "\n";
cout << sum << "\n";
}