1부터 10000사이에 `8` 몇 개 있는지?? 오래전에 작성한거라.... 수정할 부분 알려주세요. ```java import java.util.regex.Matcher; import java.util.regex.Pattern; public class _2012_06_30_googleInterview { public static void main(String[] args) { int usedCount = getUsedCount(1, // Range Start Number 10000, // Range Last Number 8); // Detecting Number System.out.println(String.format("Count : %d", usedCount)); } private static int getUsedCount(int rangeStartNum, int rangeLastNum, int detectNum) { Pattern p =Pattern.compile(Integer.toString(detectNum)); int usedCount = 0; for (int targetNum = rangeStartNum; targetNum <= rangeLastNum; targetNum++) { Matcher m =p.matcher(Integer.toString(targetNum)); int foundMatchCount =getMatchCount(m); usedCount += foundMatchCount; // if (foundMatchCount != 0) { // System.out.println(String.format("Target:[%d]\tDectedNum:[%d]\tGroupCount:[%d]", targetNum, detectNum, usedCount)); // } } return usedCount; } private static int getMatchCount(Matcher m) { int matchCount = 0; while (m.find()) { matchCount ++; } return matchCount; } } ```