You are viewing a single comment's thread. Return to all comments →
#!/bin/python3 import sys import math l1=[2, 3] n=3 while len(l1)<10000: n+=2 x=True for i in range(2, int(math.sqrt(n)) + 1): if n % i == 0: x = False break if x: l1.append(n) t = int(input().strip()) for a0 in range(t): n = int(input().strip()) print(l1[n-1])
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #7: 10001st prime
You are viewing a single comment's thread. Return to all comments →