def Euler_87(): prime1 = soe(maxp) count = set() x = 1 last = 0 for i in soegen(90): tmp =i**4 if tmp>=top:break print(i) for j in soegen(400): tmp=j**3+i**4 if tmp>=top:break for k in soegen(8000): tmp = k**2+j**3+i**4 if tmp == top:print('wtf') if tmp<top: count.add(tmp) else:break return len(count) '''
def Euler_87(): prime1 = soe(maxp) count = set() x = 1 last = 0 for i in soegen(90): tmp = i**4 if tmp >= top: break print(i) for j in soegen(400): tmp = j**3 + i**4 if tmp >= top: break for k in soegen(8000): tmp = k**2 + j**3 + i**4 if tmp == top: print('wtf') if tmp < top: count.add(tmp) else: break return len(count) '''
def Euler_35(num=10**6): i = 0 for x in soegen(num): b = True y = str(x) if evendig(y):continue yn = rotatestr(y) while yn!=y: b = isprime(int(yn)) if not b:break yn = rotatestr(yn) if b: i+=1 return i
def Euler_35(num=10**6): i = 0 for x in soegen(num): b = True y = str(x) if evendig(y): continue yn = rotatestr(y) while yn != y: b = isprime(int(yn)) if not b: break yn = rotatestr(yn) if b: i += 1 return i