-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path50798288.java
More file actions
39 lines (32 loc) · 949 Bytes
/
Copy path50798288.java
File metadata and controls
39 lines (32 loc) · 949 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
27
28
29
30
31
32
33
34
35
36
37
38
39
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringBuilder sb = new StringBuilder();
int A = Integer.parseInt(br.readLine());
int B = Integer.parseInt(br.readLine());
int C = Integer.parseInt(br.readLine());
br.close();
sb.append(A*B*C);
int count = 0;
int[] arr = new int[10];
for(int i = 0; i < 10; i++) {
for(int j = 0; j < sb.length(); j++) {
if(sb.charAt(j)-48 == i) {
count++;
}
}
arr[i] = count;
bw.write(arr[i]+"\n");
bw.flush();
count = 0;
}
bw.close();
}
}