Project Euler Problem 47
I wrote a bunch of these but never posted them up, so I'm just uploading them in bulk now. Not much to say about them at this point.
- #!/usr/bin/python
- import pysieve
- def p47(n):
- while 1:
- ints = range(n, n+4)
- if len(list(set(pysieve.factor(ints[0])))) == 4 and \
- len(list(set(pysieve.factor(ints[1])))) == 4 and \
- len(list(set(pysieve.factor(ints[2])))) == 4 and \
- len(list(set(pysieve.factor(ints[3])))) == 4:
- return ints
- n += 1
- print p47(100000)