You are viewing a single comment's thread. Return to all comments →
import sys import math t = int(input().strip()) for a0 in range(t): n = int(input().strip()) if n<=10**5 and n>=1: vb=0 b=2 while vb!=n: sr=0 for i in range(2,int(math.sqrt(b))+1): if b%i==0: sr=1 break if sr==0: vb+=1 b+=1 print(b-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 →