Skip to content

Commit

Permalink
Solution for problem 41
Browse files Browse the repository at this point in the history
  • Loading branch information
fsouza committed Jul 29, 2011
1 parent ea89c86 commit 926f500
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions problem_041/41.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"sort"
"strconv"
)
Expand All @@ -22,3 +23,19 @@ func IsPandigital(number int) bool {

return true
}

func main() {
max := 0
primes := GetPrimes(10000000)
for prime := range primes {
if prime == 0 {
break
}

if IsPandigital(prime) && prime > max {
max = prime
}
}

fmt.Println(max)
}

0 comments on commit 926f500

Please sign in to comment.