1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | import java.util.*; public class Main{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); int A = sc.nextInt(); int B = sc.nextInt(); int C = sc.nextInt(); int result = A*B*C; int[] arr = new int[10]; while(result>0){ arr[result%10]++; result /= 10; } for(int i=0;i<arr.length;i++){ System.out.println(arr[i]); } } } | cs |
'Studying JAVA > 백준' 카테고리의 다른 글
[6단계]1차원 배열 사용하기-2920번 음계 (0) | 2019.03.13 |
---|---|
[6단계]1차원 배열 사용하기-8958번 OX퀴즈 (0) | 2019.03.13 |
[6단계]1차원 배열 사용하기-1152번 단어의 개수 (0) | 2019.03.13 |
[5단계]함수 사용하기-2448번 별찍기 (0) | 2019.03.13 |
[5단계]함수 사용하기-1065번 한수 (0) | 2019.03.13 |