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.

  1. #!/usr/bin/python
  2.  
  3. import pysieve
  4.  
  5. def p47(n):
  6.     while 1:
  7.         ints = range(n, n+4)
  8.         if len(list(set(pysieve.factor(ints[0])))) == 4 and \
  9.            len(list(set(pysieve.factor(ints[1])))) == 4 and \
  10.            len(list(set(pysieve.factor(ints[2])))) == 4 and \
  11.            len(list(set(pysieve.factor(ints[3])))) == 4:
  12.             return ints
  13.         n += 1
  14.  
  15.        
  16. print p47(100000)