2023-04-05
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class array1 {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int A = Integer.parseInt(br.readLine()); //int 입력 받음
int B = Integer.parseInt(br.readLine());
int C = Integer.parseInt(br.readLine());
int[] arr = new int[10]; //길이 10의 int 배열 생성
int total = A * B * C;
String str = Integer.toString(total); //입력 받아 곱한 int형을 String형으로 변환
for(int i = 0; i < str.length(); i++){ //해당 문자열의 문자값 - 48을 빼내기
arr[(str.charAt(i) -48)]++; //배열 index값을 하나씩 더해준다
}
for(int tt : arr) {
System.out.println(tt);
}
}
}
'문제 풀이 > 자바' 카테고리의 다른 글
자바 문제 풀이 5 (0) | 2023.04.13 |
---|---|
자바 문제 풀이 4 (0) | 2023.04.11 |
자바 문제 풀이 3 (0) | 2023.04.09 |
자바 문제 풀이 2 (0) | 2023.04.08 |
230209~230223(코드워즈) (0) | 2023.02.09 |