https://www.acmicpc.net/problem/4134
import math
def isPrime(x):
if x<2:
return False
for i in range(2, int(math.sqrt(x))+1):
if x%i==0:
return False
return True
n=int(input())
for i in range(n):
x=int(input())
while True:
if isPrime(x)==True:
print(x)
break
else:
x+=1
소수를 구할 때 2 부터 제곱근까지 for문을 돌려도 같은 결과이나 더 빠른 속도이므로 제곱근인 math.sqrt(x) 사용