在[0,n]的区间挨个来尝试,用正则匹配来判断是否符合条件,简单的一匹 import java.util.Scanner; public class Test99 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); while (scanner.hasNext()) { int n = scanner.nextInt(); int selfHoldNumber = 0; ...