728x90
출처-https://www.acmicpc.net/problem/2577
728x90
import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scan=new Scanner(System.in);
int a=scan.nextInt();
int b=scan.nextInt();
int c=scan.nextInt();
int arr[]=new int[10];
int mul=a*b*c;
int num;
for (int i=1;i<=mul;i*=10) {
num=(mul%(i*10))/i;
arr[num]++;
}
for (int i=0;i<10;i++)
System.out.println(arr[i]);
}
}
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 1546] 평균 (java) (0) | 2020.08.26 |
---|---|
[백준, BOJ 3052] 나머지 (java) (0) | 2020.08.26 |
[백준, BOJ 2562] 최댓값 (java) (0) | 2020.08.26 |
[백준, BOJ 10996] 별 찍기 - 21 (java) (0) | 2020.08.25 |
[백준, BOJ 2523] 별 찍기 - 13 (java) (0) | 2020.08.25 |