import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static Main Main(){
        return new Main();
    }

    public int multiplication(int p, int q){
        return p * q;
    }

    public int units (int q){return (q % 100) % 10;}
    public int tens (int q){return (q % 100) / 10;}
    public int hundreds (int q){return q / 100;}

    public static int StringtoInteger(String p){return Integer.parseInt(p);}

    public static int sum(int p, int q, int r){
        return p + (q * 10) + (r * 100);
    }

    public static void main(String[] args) throws IOException {
        Main main = Main();

        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

        String p = br.readLine();
        String q = br.readLine();

        int units = main.multiplication(StringtoInteger(p), main.units(StringtoInteger(q)));
        int tens = main.multiplication(StringtoInteger(p), main.tens(StringtoInteger(q)));
        int hundreds = main.multiplication(StringtoInteger(p), main.hundreds(StringtoInteger(q)));

        System.out.println(units);
        System.out.println(tens);
        System.out.println(hundreds);
        System.out.println(sum(units, tens, hundreds));

    }
}

'AREA(지속적인 일상) > 02_백준' 카테고리의 다른 글

[백준] - 2753 - 윤년  (0) 2021.08.24
[백준] - 1330 대소 비교  (0) 2021.08.24
[백준] 1009번 - 분산처리  (0) 2021.08.24
[백준 1002] 터렛  (0) 2020.02.24
[백준 15552] 빠른 A+B (Java)  (0) 2020.02.24