I want to judge whether 1 million random numbers between [500000000, math.pow (2,63)-2] are prime numbers. When I use the following writing method, the program will not run all of a sudden. What is the problem and where can my algorithm be improved
def main():
for k in range(1000000):
num = random.randint(5000000000, math.pow(2, 63) - 2)
-sharp 1
if num > 1:
-sharp
for i in range(2, num):
if (num % i) == 0:
print(num, "")
break
else:
print(num, "")
-sharp 1
else:
print(num, "")