-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path곱셈.java
More file actions
26 lines (22 loc) · 706 Bytes
/
곱셈.java
File metadata and controls
26 lines (22 loc) · 706 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
// 곱셈
import java.util.*;
import java.lang.*;
import java.io.*;
class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int num1 = Integer.parseInt(br.readLine());
int num2 = Integer.parseInt(br.readLine());
int origin = num2;
List<Integer> num = new ArrayList<>();
while (num2 > 0) {
num.add(num2 % 10);
num2 /= 10;
}
int sum = 0;
for (int i = 0; i < num.size(); i++) {
System.out.println(num1 * num.get(i));
}
System.out.println(num1 * origin);
}
}