https://www.acmicpc.net/problem/2577

import java.util.Scanner;

public class Main {
 public static void main (String [] args ) {
	 int a = 0;
	 int b = 0;
	 int c = 0;
	 int mul = 0;
	 
	 Scanner scan = new Scanner (System.in);
	 a = scan.nextInt();
	 b = scan.nextInt();
	 c = scan.nextInt();
	 
	 mul = a*b*c ;
	 String parseMul = Integer.toString(mul);
	 
	 
	 int [][] arr = new int [10][2];
	 
	 
	 for(int j = 0 ; j <10 ; j++) {
		 for (int i = 0; i <parseMul.length(); i ++ ) {
//			 System.out.println("parseMul : "+Character.getNumericValue((parseMul.charAt(i))));
//			 System.out.println("check num : "+Integer.toString(j));
//			 System.out.println("is Equal : "+ (Character.getNumericValue(parseMul.charAt(i)) == j));
//			 
			 if(Character.getNumericValue((parseMul.charAt(i))) == j){
				 arr[j][1]++;
			 }
		 }
		 System.out.println(arr[j][1]);
	 }
	 	 
 }
	
}

+ Recent posts

"여기"를 클릭하면 광고 제거.