Exemple #1
0
        return False

    string = str(number)

    for x in xrange(1, 8):
        num1 = int(string[x] + string[x + 1] + string[x + 2])
        prime = listOfPrimes[x]
        if (num1 % prime != 0):
            return False

    return True


pandigital = 1234567890

combos = eu.getCombinationsOfNumberAsString(pandigital)

print "Combo Size: %d" % len(combos)
f = open("/tmp/combos.txt", 'w+')
for foo in combos:
    f.write("%s\n" % foo)

f.close()

listOfPans = []
for pan in combos:
    if (pan == '1406357289'):
        print "You Rock."
    if (checkForPrimeCraziness(pan)):
        print "Ooooooo Yeah. Found it baby: %s" % pan
        listOfPans.append(pan)
Exemple #2
0
import eulerutils as eu

number = 6070
for combo in eu.getCombinationsOfNumberAsString(number):
    print combo
Exemple #3
0
import eulerutils as eu



number=6070
for combo in eu.getCombinationsOfNumberAsString(number): 
    print combo
Exemple #4
0
    if(number < 1000000000):
        return False
    
    string = str(number)
    
    for x in xrange(1,8):
        num1 = int(string[x]+string[x+1]+string[x+2])
        prime = listOfPrimes[x]        
        if(num1 % prime != 0):
            return False

    return True

pandigital = 1234567890

combos = eu.getCombinationsOfNumberAsString(pandigital)
    
print "Combo Size: %d" % len(combos)
f = open ("/tmp/combos.txt", 'w+')
for foo in combos:
    f.write("%s\n" % foo)
    
f.close()

listOfPans = []
for pan in combos:
    if(pan == '1406357289'):
        print "You Rock."
    if(checkForPrimeCraziness(pan)):
        print "Ooooooo Yeah. Found it baby: %s" % pan
        listOfPans.append(pan)