func main() {
	d := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
	p := operations.Permutations(d)
	sum := 0
	for _, x := range p {
		if x < 1000000000 {
			continue
		}
		if isSubstringDivisible(x) {
			sum += x
		}
	}
	fmt.Println(sum)
}
Beispiel #2
0
func main() {

	result := 2
	for i := []int{1, 2, 3}; len(i) < 10; i = append(i, i[len(i)-1]+1) {
		fmt.Println(i)
		pandigital := operations.Permutations(i)
		for _, x := range pandigital {
			if primes.IsPrime(x) && x > result {
				fmt.Println(x)
				result = x
			}
		}
	}

}