문제
(백준 2588) 곱셈
Java 풀이
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner num = new Scanner(System.in);
int num1 = num.nextInt();
int num2 = num.nextInt();
int result = num2 % 10;
int new_result = result / 1;
System.out.println(num1 * new_result);
result = num2 % 100;
new_result = result / 10;
System.out.println(num1 * new_result);
result = num2 % 1000;
new_result = result / 100;
System.out.println(num1 * new_result);
System.out.println(num1 * num2);
}
}