Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def primosdistintos(n):
- a = n
- i = 2
- divisoresprimos = []
- while i <= a:
- if a%i == 0:
- if i not in divisoresprimos:
- divisoresprimos.append(i)
- a = a/i
- if a%i != 0:
- i+=1
- else:
- i+=1
- return len(divisoresprimos)
- def funcion():
- i = 1
- while 1==1:
- if primosdistintos(i) != 4:
- print i, "no es"
- i+=1
- else:
- if primosdistintos(i+1) != 4:
- print i, "no es"
- i+=2
- else:
- if primosdistintos(i+2) != 4:
- print i, "no es"
- i+=3
- else:
- if primosdistintos(i+3) != 4:
- print i, "no es"
- i+=4
- else:
- return i
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement