숫자의 개수
-
boj)2577PS/boj 2020. 8. 23. 12:39
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int a = scanner.nextInt(); int b = scanner.nextInt(); int c = scanner.nextInt(); int[] count = new int[10]; // 0 ~ 9 10 String total = String.valueOf(a * b * c); for (int i = 0; i < total.length(); i++) { count[total.charAt(i) - '0']++; // char형에서 int형으로 반환할때 - '0'을 해준..