private static int count(int index, int d, int number, boolean used) {
		if (index == d)
			return (Problem413BaseCase.isOneChildNumber(number)?1:0);
		int count = 0;
		for (int i = 0; i < 10; i++) {
			if (used && (i == 0 || i == d))
				continue;
			count += count(index + 1, d, number*10+i, used || i==0 || i == d);
		}
		return count;
	}