TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
input_line = input().split(' ')
taka = int(input_line[0])
aoki = int(input_line[1])
numK = int(input_line[2])

for i in range(k):
  if taka >= 1:
    taka -= 1
    continue
  elif aoki >= 1:
    aoki -= 1
    continue
  else:
    break

print(taka + ' ' + aoki)

input_line = input().split(' ')
taka = int(input_line[0])
aoki = int(input_line[1])
numK = int(input_line[2])
result = ""
if taka + aoki <= numK:
  result = "0 0"
elif taka >= numK:
  result = str(taka - numK) + " " + str(aoki)
elif taka + aoki > numK:
  result = "0 " + str(taka + aoki - numK)
  
print(result)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
nums = input().split(" ")
A = int(nums[0])
B = int(nums[1])
K = int(nums[2])

for i in tqdm(range(0,K)):
  if A >= 1:
    A -= 1
  elif B >= 1:
    B -= 1

print(A, end=" ")
print(B)

nums = input().split(" ")
A = int(nums[0])
B = int(nums[1])
K = int(nums[2])


if A >= K:
  A -= K
  print(A, end=" ")
  print(B)
else:
  K -= A
  A = 0
  B -= K
  if B < 0:
    B = 0
  print(A, end=" ")
  print(B)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
a,b,k=map(int,input().split())
if k>=0 and k <=a:
  print(a-k,b)
elif k>a, k<=a+b:
  print(0, b-(k-a))
else:
  print(0,0)

a,b,k=map(int,input().split())
if k>=0 and k <=a:
  print(a-k,b)
elif k>a and k<=a+b:
  print(0, b-(k-a))
else:
  print(0,0)

Verdicts: Runtime Error

Accepted
Problem: Takahashi has A cookies, and Aoki has B cookies. Takahashi will do the following action K times:    * If Takahashi has one or more cookies, eat one of his cookies.   * Otherwise, if Aoki has one or more cookies, eat one of Aoki's cookies.   * If they both have no cookies, do nothing.  In the end, how many cookies will Takahashi and Aoki have, respectively?

Submission attempts (in order):
a,b,k=map(int,input().split())
print(max(0,A-K),max(0,B-max(0,K-A)))

a,b,k=map(int,input().split())
print(max(0,a-k),max(0,b-max(0,k-a)))

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
N =int(input())
p=N
while cnt <10**7:
    if is_prime(p):
        p +=1
    else:
        print(p)
        break

def is_prime(n):
    for p in range(2,n):
        if n % p ==0:
            return True

N =int(input())
p=N
while cnt <10**7:
    if is_prime(p):
        p +=1
    else:
        print(p)
        break

def is_prime(n):
    for p in range(2,n):
        if n % p ==0:
            return True

N =int(input())
p=N
while p <10**7:
    if is_prime(p):
        p +=1
    else:
        print(p)
        break

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import math
def trial_division(tar):
	dest  = int(math.sqrt(tar))+1
	for i in range(2,dest):
		if tar%i == 0:
			#print(int(i))
			return int(0) #not prime number
	return int(1) 

x = int(input())
while trial_division(x)==0:
	x+=1

import math
def trial_division(tar):
	dest  = int(math.sqrt(tar))+1
	for i in range(2,dest):
		if tar%i == 0:
			#print(int(i))
			return int(0) #not prime number
	return int(1) 

x = int(input())
while trial_division(x)==0:
	x+=1
print(x)

Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def judge_prime(num):
    FLAG = True
    
    for i in range(2, int(np.sqrt(num))+1):
        if (num%i == 0):
            FLAG = False
    
    if (num == 2):
        FLAG = True
    
    return(FLAG)

X = int(input())

while (True):
    flag = judge_prime(X)
    
    if (flag):
        break
    
    X += 1

print(X)

def judge_prime(num):
    FLAG = True
    
    for i in range(2, int(num**0.5)+1):

        if (num%i == 0):
            FLAG = False
    
    if (num == 2):
        FLAG = True
    
    return(FLAG)

X = int(input())

while (True):
    flag = judge_prime(X)
    
    if (flag):
        break
    
    X += 1

print(X)


Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
X = input()
X = int(X)

while True:
  for x in range(2, n):
    if n % p == 0:
      break
  else:
    print(x)
    break
  x +=1

x = int(input())
while True:
    for i in range(2,x):
        if x%i==0:
            break
    else:
        print(x)
        break
    x +=1

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
X = int(input())
P = make_primes_list(100005)

def make_primes_list(n):
    primes = set(range(2, n+1))
    for i in range(2, int(n**0.5+1)):
        primes.difference_update(range(i*2, n+1, i))
    primes=list(primes)
    return primes

for x in range(X,100005):
    if x in P:
        print(x)
        break

X = int(input())

def make_primes_list(n):
    primes = set(range(2, n+1))
    for i in range(2, int(n**0.5+1)):
        primes.difference_update(range(i*2, n+1, i))
    primes=list(primes)
    return primes

P = make_primes_list(100005)

for x in range(X,100005):
    if x in P:
        print(x)
        break

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import random


def is_prime(q, k=50):
    q = abs(q)
    
    if q == 2:
        return True
    if q < 2 or q & 1 == 0:
        return False

    
    d = (q-1) >> 1
    while d & 1 == 0:
        d >>= 1

    
    for i in xrange(k):
        a = random.randint(1, q-1)
        t = d
        y = pow(a, t, q)
        
        while t != q-1 and y != 1 and y != q-1:
            y = pow(y, 2, q)
            t <<= 1
        if y != q-1 and t & 1 == 0:
            return False
    return True

X = int(input())

while True:
    if is_prime(X):
        break
    X += 1
print(X)





import random


def is_prime(q, k=50):
    q = abs(q)
    
    if q == 2:
        return True
    if q < 2 or q & 1 == 0:
        return False

    
    d = (q-1) >> 1
    while d & 1 == 0:
        d >>= 1

    
    for i in range(k):
        a = random.randint(1, q-1)
        t = d
        y = pow(a, t, q)
        
        while t != q-1 and y != 1 and y != q-1:
            y = pow(y, 2, q)
            t <<= 1
        if y != q-1 and t & 1 == 0:
            return False
    return True

X = int(input())

while True:
    if is_prime(X):
        break
    X += 1
print(X)





Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def nextprime(x):
    if pow(2, x-1, x) != 1:
        return nextprime(x+1)
    for i in range(2, i*i):
        if x % i == 0:
            return nextprime(x+1)
    return x


x = int(input())

if x == 2:
    print("2")
else:
    print(nextprime(x))


def nextprime(x):
    for i in range(2, x):
        if x % i == 0:
            return nextprime(x+1)
    return x


x = int(input())

if x == 2:
    print("2")
else:
    print(nextprime(x))


Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):

inputA = int(input())

inputA = 99992
flag = 0
for count in range(inputA+1,300000):
    for mod in range(2,200000):
        if count % mod == 0:
            flag = mod
            break
        mod += 1
    if count == flag:
        print(count)
        break
    else:
        count += 1



inputA = map(int, input())

flag = 0
for count in range(inputA+1,300000):
    for mod in range(2,10000):
        if count % mod == 0:
            flag = mod
            break
        mod += 1
    if count == flag:
        print(count)
        break
    else:
        count += 1



inputA = int(input())

flag = 0
for count in range(inputA,300000):

    for mod in range(2,200000):
        if count % mod == 0:
            flag = mod
            break
        mod += 1
    if count == flag:
        print(count)
        break
    elif flag == 0:
        print(inputA)
    else:
        count += 1


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x=int(input())
ans=x-1
cnt=0
while cnt==0:
	cnt=1
	ans+=1
	for i in range(2,ans):
		if ans%i==0:
			cnt=0
            break
print(ans)

x=int(input())
ans=x-1
cnt=0
while cnt==0:
	cnt=1
	ans+=1
	for i in range(2,ans):
		if ans%i==0:
			cnt=0
			break
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
try_n = x - 1
b_flg = True
roop_c = 0
while b_flg:
    try_n += 1
    for n in range(2, try_n):
        roop_c += 1
        if try_b == 2: 
            b_flg =False
            break
        if try_n % n == 0: 
            break
        else:
            if roop_c == try_n - 2:
                b_flg = False
print(try_n)

x = int(input())
try_n = x - 1
b_flg = True
roop_c = 0
while b_flg:
    try_n += 1
    for n in range(2, try_n):
        roop_c += 1
        if try_b == 2: 
            b_flg =False
            break
        if try_n % n == 0: 
            break
        else:
            if roop_c == try_n - 2:
                b_flg = False
print(try_n)

x = int(input())
b_flg = True
try_n = x - 1
roop_c = 0
if x == 2:
    print(x)
else:
    while b_flg:
        try_n += 1
        for n in range(2, try_n):
            roop_c += 1
            if try_n % n == 0: 
                break
            else:
                if roop_c == try_n - 2:
                    b_flg = False
    print(try_n)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def is_prime(x, i):
  if i*i > x:
    return True
  elif x % i == 0:
    return False
  else:
    is_prime(x, i+1)
  
def gen_prime(x):
  if is_prime(x, 2):
    return x
  else:
    gen_prime(x+1)
    
if __name__ == "__main__":
  x = int(input())
  print(gen_prime(x))

def is_prime(x, i):
  if i*i > x:
    return True
  elif x % i == 0:
    return False
  else:
    is_prime(x, i+1)
  
def gen_prime(x):
  if is_prime(x, 2):
    return x
  else:
    gen_prime(x+1)
    
if __name__ == "__main__":
  import sys
  sys.setrecursionlimit(10240)
  x = int(input())
  print(gen_prime(x))


def is_prime(x, i):
  if i*i > x:
    return True
  elif x % i == 0:
    return False
  else:
    return is_prime(x, i+1)
  
def gen_prime(x):
  if is_prime(x, 2):
    return x
  else:
    return gen_prime(x+1)
    
if __name__ == "__main__":
  import sys
  sys.setrecursionlimit(10240)
  x = int(input())
  print(gen_prime(x))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
    x=int(input())
    ans=x
    while True:
        flag=False
        for i in range(2,int(x**0.5)):
            if ans%i==0:
                flag=True
                break
        if flag:
            ans+=1
            continue
        else:
            break
    print(ans)
resolve()

import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    x=int(input())
    ans=x
    while True:
        flag=False
        for i in range(2,int(x**0.5)):
            if ans%i==0:
                flag=True
                break
        if flag:
            ans+=1
            continue
        else:
            break
    print(ans)
resolve()

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())

def isPrime(x):
  for i in range(2, x**2+1):
    if x % i == 0:
	  return False
    
  return True

for i in range(x, 10**5 + 1):
  if isPrime(i):
    print(i)
    break

import math

def is_prime(x):
  if(x <= 1):
    return False
 
  for i in range(2, int(math.sqrt(x))):
    if(x % i == 0):
      return False

  return True

x = int(input())
while is_prime(x) is False:
  x += 1

print(x)

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
a=int(input())

for i in range(a+1,10**5):
  for j in range(2,i):
    if i%j!=0:
      print(i)
      exit()


a=int(input())

for i in range(a,10**6):
  isprime=True
  for j in range(2,i):
    if i%j==0:
      isprime=False
      break
  if isprime==True:
    print(i)
    exit()


Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def isPrime(x):
    if x <= 1: return False
    i = 2
    while i ** 2 <= x:
        if x % i == 0: return False
        i += 1

a = int(input())
while True:
    a += 1
    if isPrime(a): print(a)

def isPrime(x):
    if x <= 1: return False
    i = 2
    while i ** 2 <= x:
        if x % i == 0: return True
        i += 1

a = int(input())
while True:
    a += 1
    if isPrime(a):
        print(a)
        break

def isPrime(x):
    if x <= 1: return False
    i = 2
    while i ** 2 <= x:
        if x % i == 0: return False
        i += 1

a = int(input())
while True:
    a += 1
    if isPrime(a):
        print(a)
        break

def isPrime(x):
    if x <= 1: return False
    i = 2
    while i ** 2 <= x:
        if x % i == 0: return False
        i += 1
    return True

a = int(input())
while True:
    if isPrime(a):
        print(a)
        break
    a += 1

Verdicts: Time Limit Exceeded

Wrong Answer

Time Limit Exceeded

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):

def get_primenumber(N):
    
    prime_list = [2]
    
    for num in range(3,N+20,2):
      
      if all( num % prime != 0 for prime in prime_list):
        prime_list.append(num)

    return prime_list

def main():
    prime = []
    ans = []
    number = int(input())
    print(max(get_primenumber(number)))

if __name__ == "__main__":
    main()

スコード 

Copy
Copy
import math
def prime(n):
    for i in range(2, int(math.sqrt(n))):
        if n % i == 0: return False
    return True
 
X = int(input())
 
for i in range(X, 10**8):
    if prime(i):
        print(i)
        exit(0)
 
print('No prime number in this range')


def get_primenumber(N):
    
    prime_list = [2]
    
    for num in range(3,N+100,2):
      
      if all( num % prime != 0 for prime in prime_list):
        prime_list.append(num)

    return prime_list

def main():
    prime = []
    ans = []
    number = int(input())
    print(max(get_primenumber(number)))

if __name__ == "__main__":
    main()


def get_primenumber(N):
    
    prime_list = [2]
    
    for num in range(3,N+2,2):
      
      if all( num % prime != 0 for prime in prime_list):
        prime_list.append(num)

    return prime_list

def main():
    prime = []
    ans = []
    number = int(input())
    print(max(get_primenumber(number)))

if __name__ == "__main__":
    main()


def get_primenumber(N):
    
    prime_list = [2]
    
    for num in range(3,N+1,2):
      
      if all( num % prime != 0 for prime in prime_list):
        prime_list.append(num)

    return prime_list

def main():
    prime = []
    ans = []
    number = int(input())
    prime = get_primenumber(50000)
    print(prime)
    for i in range(number):
        if number < prime[i]:
            ans.append(prime[i])
            
    print(min(ans))

if __name__ == "__main__":
    main()


import math
def prime(n):
    for i in range(2, int(math.sqrt(n))):
        if n % i == 0: return False
    return True
 
X = int(input())
 
for i in range(X, 10**8):
    if prime(i):
        print(i)
        exit(0)
 
print('No prime number in this range')

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import fractions

def lcm(x,y):
    return (x*y)//fractions.gcd(x,y)

a,b=map(int,input().split())
print(lcm(a,b))

n=int(input())
a=list(map(int,input().split()))

x=0
for i in range(n):
    if a[i]!=0:
        x+=1
a=sum(a)

print(a//x if a%x==0 else a//x+1)

def prime(n):
    for i in range(2,n):
        if n%i==0:
            return False
    return True

n=int(input())

i=0
while True:
    if prime(n+i):
        print(n+i)
        exit()
    else:
        i+=1

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def is_prime(num):
  for i in range(num):
    if num % i == 0:
      return False
  return True

x = int(input())

for i in range(x, 10000+4):
  if is_prime(i):
    print(i)
    break

x = int(input())

def is_prime(num):
  for i in range(2, num):
    if num % i == 0:
      return False

  return True

count_x = x

while count_x < 10**5:
  if is_prime(x)==True:
    print(count_x)
    break
  else:
    count_x += 1
    pass

  

def is_prime(num):
  for i in range(2, num):
    if num % i == 0:
      return False
 
  return True

x = int(input())

for i in range(x, 100004):
  if is_prime(i):
    print(i)
    break

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import math

check = 1
X = int(input())

while check == 1:
    check = 0
    dest = int(math.sqrt(X))    
    for i in range(2,dest):
        if X % i == 0:
            check = 1
            break
    if check == 1:
        X += 1

import math

check = 1
X = int(input())

while check == 1:
    check = 0
    dest = int(math.sqrt(X))    
    for i in range(2,dest):
        if X % i == 0:
            check = 1
            break
    if check == 1:
        X += 1
print(X)  

Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import math
n=int(input())

while True:
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            break
    n += 1

    
print(n)

X = int(input())

X += 1
while True:
    std = X**0.5
    for i in range(1,int(std)):
        if X%i == 0:
            break
    X += 1

print(X)


import math
n=int(input())

def prime(n):
    if n <= 1:
        return False
    
    for k in range(2, int(math.sqrt(n))+1):
        if n%k ==0:
            return False
    return True
    
while not(prime(n)):
    n += 1

    
print(n)

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
num = 101000
arr = list(range(2,num))
arr = set(arr)
primes = {2}

prime = min(arr)
while prime < num-500:
    primes.add(prime)
    nonprime = {prime * i for i in range(1,num//prime + 2)}
    arr = arr.difference(nonprime)
    prime = min(arr)

sol = {i for i in primes if i >= x}

print(min(sol))

x = int(input())
num = 100200
arr = list(range(2,num))
arr = set(arr)
primes = {2}
floor = int(num**0.5)+2

prime = min(arr)
while prime < floor:
    prime = min(arr)
    primes.add(prime)
    nonprime = {prime * i for i in range(1,num//prime + 2)}
    arr = arr.difference(nonprime)

primes = primes.union(arr)

sol = {i for i in primes if i >= x}

print(min(sol))

Verdicts: Time Limit Exceeded

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):

X = int(input())

def isPrime(n):
    for i in range(2, n):
        if n % i == 0:
            return False
    return True

while True:
    if isPrime(X):
        break
    else:
        X += 1


X = int(input())

def isPrime(n):
    for i in range(2, n):
        if n % i == 0:
            return False
    return True

while True:
    if isPrime(X):
        print(X)
        break
    else:
        X += 1

Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
a=0dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

import math
t = int(input())
if t<2:
    print(2)
    exit()
for i in range(t,t+250):
    v = int(math.sqrt(i))
    f=0
    for j in range(2,v+1):
        if i%j==0:
            f=1
            break
    if(f==0):
        print(i)
        break

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
sosuu = list(sieve.primerange(2, 1000000))
for i in sosuu:
    if i >= x:
        print(i)
        break

x = int(input())
flag = False
for i in range(x, 1000000):
    for j in range(2, i+1):
        #print(i, j)
        if j == i:
            print(i)
            flag = True
            break
        if i % j == 0:
            #print('*', i, j)
            break
    if flag:
        break

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def SieveOfEratosthenes(n): 
    prime = [True for i in range(10**5 + 1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * 2, 10**5 + 1, p): 
                if prime[i]:
                    prime[i] = False
        p += 1
    prime[0], prime[1]= False, False
    count = 1
    while(True):
        if prime[p] and p>n:
            print(p)
            break
        p += 1
            
x = int(input())
SieveOfEratosthenes(n)

def SieveOfEratosthenes(n): 
    prime = [True for i in range(10**6 + 1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * 2, 10**6 + 1, p): 
                if prime[i]:    prime[i] = False
        p += 1
    prime[0], prime[1] = False, False
    count = 1
    while(True):
        if prime[p] and p>=n:
            print(p);    break
        p += 1
            
n = int(input())
SieveOfEratosthenes(n)

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
n=int(input()) 
m=10**5+4 
for i in range(n,m): 
	lst=[] 
	if all(( i % j) !=0 for  j in range(2,int(n**0.5//1+1))): 
		print(i,j) 
		break

n=int(input())
m=10**5+1
for j in range()
for i in range(n,m):
  for j in range(2,int(n**0.5//1+1)):
    i % i==0:
      print(i)
      break

n=int(input())
bool_1=True
while(1):
	for i in range(n**0.5//1):  
		if n % i ==0: 
			bool_1=False
			break
    n+=1      
    if bool_1:break
print(bool_1)

n=int(input()) 
while(1): 
	bool_1=True 
	for i in range(2,int(n**0.5//1)):   
		if n % i ==0:  
			bool_1=False 
			break     
	if bool_1:break 
	n+=1 
print(n)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
a = False
while a = True:
  b = range(x) + 1
  c = x/b
  d = [d.is_integer() for d in c[1:-1]]
  if any(d):
    x = x + 1
  else:
    a = True
    break
print(x)

x = int(input())
a = False
while a == True:
  b = range(x) + 1
  c = x/b
  d = [d.is_integer() for d in c[1:-1]]
  if any(d):
    a = True
    break
  x = x + 1
print(x)

x = int(input())
a = False
while a = True:
  b = range(x) + 1
  c = x/b
  d = [d.is_integer() for d in c[1:-1]]
  if not any(d):
    a = True
    break    
  else:
    x = x + 1
print(x)

x = int(input())
a = False
while a = True:
  b = range(x) + 1
  c = x/b
  d = [d.is_integer() for d in c[1:-1]]
  if any(d):
    a = True
    break
  x = x + 1
print(x)

x = int(input())
a = False
while a == False:
  b = list(range(1,x) ) 
  c = [x/c for c in b]
  d = [d.is_integer() for d in c[1:-1]]
  if not any(d):
    a = True
    break    
  else:
    x = x + 1
print(x)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def main():
  X=int(input())
  for i in X:
    a=X+i
    if all(a%j!=0 for j in range(2,a)):
      print(a)
  break
main()

import math
X=int(input())
for i in range(0,X):
  a=X+i
  c=int(math.sqrt(a))
  for j in range(2,c):
    if a%j!=0:
      print(a)
break
      

X=int(input())
b=X**0.5
if all(X%i!=0 for i in range(2,int(b)+1)):
  X+=1
else:
  print(X)

import math
X=int(input())
for i in range(0,20):
  a=X+i
  b=a**0.5
  for j in range(2,math.floor(b)+1):
    if a%b!=0:
      print(a)
       break
break

def main():
  import math
  X=int(input())
  for i in range(0,20):
    a=X+i
    b=a**0.5
    for j in range(2,math.floor(b)):
      if a%b!=0:
        print(a)
        break
  break

main()
     

X=int(input())
b=X**0.5
while any(X%i==0 for i in range(2,int(b)+1)):
  X+=1
else:
  print(X)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
count = 0

from math import sqrt

while count == 0:
  k = 0
  for i in range(1, x):
    if x % i == 0:
      k += 1
  if k == 1:
    print(x)
    count = 1
  else:
    if x % 2 == 0:
	  x += 1
    else:
      x += 2

x = int(input())
count = 0

from math import sqrt

while count == 0:
	if x % 2 == 0:
      x += 1
	else:
      x += 2
    for i in range(1, round(sqrt(x)), 2):
      if x % i == 0:
        count = 1

x = int(input())
count = 0

from math import sqrt

while count == 0:
  k = 0
  for i in range(1, x):
    if x % i == 0:
      k += 1
  if k == 1:
    print(x)
    count = 1
  else:
    if x % 2 == 0:
      x += 1
    else:
      x += 2

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
X=int(input())
count = 0

for i in range(100000):
    for j in range(1,X):
        if X % j == 0:
            count = count + 1
            break
    if count == 0:
        break
    counr = 0
    X = X + 1

print(X)

X=int(input())
count = 0

for i in range(100000):
    for j in range(1,X):
        if X % j == 0:
            count = count + 1
            break
    if count == 0:
        break
    count = 0
    X = X + 1

print(X)


X = int(input())
count = 0


for i in range(100000):
    for j in range(2,X):
        if X % j == 0:
            count = count + 1
            break
    if count == 0:
        break
    count = 0
    X = X + 1

print(X)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
while True:
	xs = [n for i in range(x) if x % n == 0]
    if len(xs) > 2:
      break
	x += 1
print(x)


x = int(input())
while True:
	xs = [n for i in range(x) if x % n == 0]
    if len(xs) > 2:
      break
	x += 1
print(x)

x = int(input())
while True:
  xs = [i for i in range(1, x + 1) if x % i == 0]
  if len(xs) == 2:
    break
  x += 1
print(x)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def func(x):
    for i in range(2,x+1):
        if x%i == 0:
            return -1
    return x

n = int(input())
end = 10**5 + 1
for x in range(n,end):
    tmp = func(x)
    if tmp != -1:
        print(tmp)
        break


def func(x):
    end = x**0.5
    i = 2
    while(i < end):
        if x%i == 0:
            return False
        i += 1
    return True

n = int(input())
for x in range(n,2*n):
    if func(x):
        print(x)
        break

Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
n = int(input()) 

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1;
        is_prime(n)
    print(n)
        
    

n = int(input()) 

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1
        is_prime(n)
    print(n)
        
    

n = int(input()) 

import math
def is_prime(n):
    if n == 1: return True

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True

if(is_prime(n)):
    print(n)
else:
    while(is_prime(n) == False):
        n = n + 1
        is_prime(n)
    print(n)
        
    

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import sys
input = sys.stdin.readline

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = input().rstrip()

for i in range(K+K,N):
  if T[i] == T[i-K]:
    T[i] = 'o'

point = 0
for t in T:
  if t == 'r':
    point += P
  elif t == 's':
  	point += R
  elif p == 'p':
    point += S

print(point)

import sys
input = sys.stdin.readline
X = int(input())

max_n = 100003
primes = [True] * (max_n+1)

for i in range(2,max_n+1):
  if primes[i] == True:
    if i >= X:
      print(i)
      break
    for j in range(i+i, max_n+1, i):
      primes[j] = False

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
from functools import lru_cache

@lru_cache(maxsize=1e6)
def n_th_prime(n):
    if n == 0:
        return 2
    while True:
        for i in range(n):
            if x % n_th_prime(i) == 0:
                break
        else: return(x)
        x += 1

from functools import lru_cache
 
@lru_cache(maxsize=1e6)
def n_th_prime(n):
    if n == 0:
        return 2
    while True:
        for i in range(n):
            if x % n_th_prime(i) == 0:
                break
        else: return(x)
        x += 1

x = int(input())

k=0
while True:
    a = n_th_prime(k)
    if x > a:
        k += 1
    else:
        print(a)

from functools import lru_cache
 
@lru_cache(maxsize=100000)
def n_th_prime(n):
    if n == 0:
        return 2
    primes = [n_th_prime(k) for k in range(n)]
    k = 1
    x = primes[-1] + 1
    while True:
        for p in primes[:k]:
            if x % p == 0:
                x += 1
                break
        else:
            if x > p**2:
                k += 1
            else:
                return x

x = int(input())

k = 0
p = 2
while True:
    for i in range(k):
        p = n_th_prime(i)
        if x % p == 0:
            x += 1
            break
    else:
        if x > p**2:
            k += 1
        else:
            print(x)
            break

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
while True:
    for i in range(2,int(x**0.5)+1):
        if x%i==0:
            x += 1
            break
        else:
            print(x)
            exit()


n = int(input())
for i in range(n, 2 * n):
    cnt = 0
    for j in range(2, int(i ** 0.5) + 1):
        if i % j != 0:
            cnt += 1
    
    if cnt == int(i ** 0.5) - 1:
        print(i)
        break
            

Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import math
from goto import goto, label

X = int(input())
max = 10 ** 5

for i in range(X,max):
    sqt = math.sqrt(i)
    for j in range(1, math.ceil(sqt)):
        cal = i % j
        if cal == 0:
            print(i)
            goto .END
label .END


import math
X = int(input())
key = 0

def prim(N):
    sqt = int(math.sqrt(N))
    for i in range(2,sqt+1):
        if N%i == 0:
            return False
    return True

while key == 0:
    if prim(X):
        key = 1
        break
    X += 1

print(X)

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
#coding:utf-8
import math
import collections

def prime():
    prime = [2, 3]
    for i in range(5, 1000000, 2):
        flag = True
        for j in range(1, len(prime)):
            if prime[j] ** 2 > i:
                break
            if i % prime[j] == 0:
                flag = False
                break
        if flag:
            prime.append(i)
    return prime

if __name__ == "__main__":
    x = int(input())
    prime = prime()
    
    for num in prime:
        if int(num) >= x:
            print(num)
            break

#coding:utf-8
import math


def prime(n):
    if n == 2:
        return True
    elif (n < 2) or (n % 2 == 0):
        return  False
    else:
        i = 3
        while i <= math.sqrt(n):
            if n % i == 0:
                return False
            i += 2

        return True

if __name__ == "__main__":
    x = int(input())
    num = x

    while prime(num) == False:
        num += 1

    print(num)

Verdicts: Time Limit Exceeded

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
from math import ceil
x=int(input())
i=0
ok=True
if x<=2:
  print(2)
elif x==3:
  print(3)
elif x==4:
  print(5)
else:
  while 1:
    for j in range(2,ceil((x+i)**0.5)):
      if (x+i)%(j+1)==0:
        ok=False
    if ok:
      print(x+i)
      exit()
    i+=1

from math import ceil
x=int(input())
i=0
ok=True
if x<=2:
  print(2)
elif x==3:
  print(3)
elif x==4:
  print(5)
else:
  while 1:
    n=ceil((x+i)**0.5)
    for j in range(2,n):
      if (x+i)%j==0:
        ok=False
    if ok:
      print(x+i)
      exit()
    i+=1


from math import ceil
x=int(input())
i=0
ok=True
if x<=2:
  print(2)
elif x==3:
  print(3)
elif x==4:
  print(5)
else:
  while 1:
    for j in range(2,ceil((x+i)**0.5)):
      if (x+i)%j==0:
        ok=False
    if ok:
      print(x+i)
      exit()
    i+=1


from math import ceil
x=int(input())
i=0
if x<=2:
  print(2)
elif x==3:
  print(3)
elif x==4:
  print(5)
else:
  while 1:
    ok=True
    n=ceil((x+i)**0.5)
    for j in range(2,n):
      if (x+i)%j==0:
        ok=False
        break
    if ok:
      print(x+i)
      exit()
    i+=1


Verdicts: Wrong Answer

Time Limit Exceeded

Time Limit Exceeded

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def P(n):
    if type(n)!=int:raise TypeError
    if n<1:raise ValueError
    if n==1:return -1
    if n&1==0:return 2
    a=1
    while a*a<n:
        a+=2
        if n%a==0:return a
    return 0
import math
a=int(input())
while P(a)==0:a+=1
print(a)

def P(n):
    if type(n)!=int:raise TypeError
    if n<1:raise ValueError
    if n==1:return -1
    if n%2==0and n!=2:return 2
    a=3
    while a*a<n:
        if n%a==0:return a
        a+=2
    return 0
import math
a=int(input())
while P(a):a+=1
print(a)

Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
li = []

def is_prime(n):
        return False
    for m in li:
        if m * m > n: 
            return True
        if n % m == 0:
            return False
    return True

n = int(input())
for i in range(2, n):
  if is_prime(i):
    li.append(i)

while True:
  if is_prime(n):
    print(n)
    break
  n += 1

li = []

def is_prime(n):
  for m in li:
    if m * m > n: 
      return True
    if n % m == 0:
      return False
  return True

n = int(input())
for i in range(2, n):
  if is_prime(i):
    li.append(i)

while True:
  if is_prime(n):
    print(n)
    break
  n += 1

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x, y, z = map(int, input().split())

def takahashi(A, B, K):
  if A <= K <= A + B:
    print(0, B - (K - A))
  elif K < A:
    print(A - K, B)
  else:
    print(0, 0)
    
takahashi(x, y, z)

import math

X = int(input())

cnt = 0


def prime(x):
  for i in range(2, math.floor(math.sqrt(x)) + 1):
    if x % i == 0:
      return False
  return True
      

for j in range(1000000000):
  if prime(X) == True:
    print(X)
    break
  else:
    X += 1

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
n.k = map(int,input().split())
r,s,p = map(int,input().split())
t = list(input())
for i in range(n-k):
    if t[k+i] == t[i]:
        t[k+i] = 0
xs = t.count('r')*p+ t.count('s')*r+t.count('p')*s
print(x)

x = int(input())
def prime(n):
    for i in range(2,n):
        if n%i == 0:
            return False
    return True
while True:
    if prime(x):
        print(x)
        break
    x += 1


Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x=int(input())
from numpy import mod

if x <= 3:
    ans=x
    prime=True
elif mod(x,2)==0:
    prime=False
else:
    # check prime or not
    for i in range(3,x+1,2):
        if mod(x,i)==0:
            if i==x:
                prime=True
                ans=x
            else:
                prime=False
                break
if prime==False: # look for prime
    if mod(x,2)==0:
        x2=x-1
    else:
        x2=x-2
            
    while (prime==False):
        x2= x2+2
        print('x2',str(x2))
        prime=True
        for i in range(3,x2+1,2):
            if mod(x2,i)==0:
                if i==x2:
                    prime=True
                    ans=x2
                else:
                    prime=False
                    break
    

print(ans)

x=int(input())
from numpy import mod

if x <= 3:
    ans=x
    prime=True
elif mod(x,2)==0:
    prime=False
else:
    # check prime or not
    for i in range(3,x+1,2):
        if mod(x,i)==0:
            if i==x:
                prime=True
                ans=x
            else:
                prime=False
                break
if prime==False: # look for prime
    if mod(x,2)==0:
        x2=x-1
    else:
        x2=x-2
            
    while (prime==False):
        x2= x2+2
        prime=True
        for i in range(3,x2+1,2):
            if mod(x2,i)==0:
                if i==x2:
                    prime=True
                    ans=x2
                else:
                    prime=False
                    break
    

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
pip install sympy 
x = int(input())
from sympy import nextprime
print(nextprime(x - 1))

import math
x = int(input())
for i in range(2,int(math.sqrt(x))):
    if x % i == 0:
        x += 1
print(x)

import math
x = int(input())
for i in range(2, int(math.sqrt(x)) + 2):
    if x % i == 0:
        x += 1
print(x)

import math
print(int(math.sqrt(x)))
for i in range(2, int(math.sqrt(x)) + 2):
    if x % i == 0:
        x += 1
print(x)

n = int(input())
for i in range(n, 100004):
    flag = 0
    for j in range(2, int(i**0.5) + 1):
        if i % j == 0:
            flag = 1
            break
    if flag == 0:
        print(i)
        break
        

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
# Original Submission At: https://atcoder.jp/contests/abc149/submissions/16823042
x= int(input())

def prime_check(num,count):
    while num % count == 0:
        num = num + 1
    if num <= count**2:
        print(num)
    else:
        prime_check(num,count+1)

if x==2 :
    print (2)
else:
    prime_check(x,2)


# Original Submission At: https://atcoder.jp/contests/abc149/submissions/16823042
x= int(input())

def prime_check(num,count):
  	while True:
        while num % count == 0:
            num = num + 1
            count = 2
    	if num <= count**2:
        	print(num)
            break
        else:
          count = count + 1

if x==2 :
    print (2)
else:
    prime_check(x,2)


# Original Submission At: https://atcoder.jp/contests/abc149/submissions/16823042
x= int(input())

def prime_check(num,count):
    while True:
        while num % count == 0:
            num = num + 1
            count = 2
        if num <= count**2:
            print(num)
            break
        else:
            count = count + 1

if x==2 :
    print (2)
else:
    prime_check(x,2)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import fractions as gcd

a, b = map(int, input().split())
print(a*b // gcd(a,b))

x = int(input())

while True:
    for i in range(2,int(x**0.5)+1):
        if x%i==0:
            x = x + 1
            break()
        else:
            if i == x-1:
                print(x)
                exit()
            

x = int(input())

while True:
    for i in range(2,int(x**0.5)+1):
        if x%i==0:
            x = x + 1
            break
    else:
        print(x)
        exit()
            

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True
  
  
x = int(input())

while True:
  if is_prime(x):
    print(x)
    break
  x += 1

import math 
def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True
  
  
x = int(input())

while True:
  if is_prime(x):
    print(x)
    break
  x += 1

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import math
n=int(input())
flag=0
def sosuu(m):
    for i in range(2,math.sqrt(m)+1):
        if m%i==0:
            return False
    return True

while flag==0:
    if sosuu(n):
        flag=1
    n+=1
print(n)

import math
n=int(input())
flag=0
def sosuu(m):
    h=int(math.sqrt(m))
    for i in range(2,h+1):
        if m%i==0:
            return False
    return True

while flag==0:
    
    if sosuu(n):
        flag=1
        break
    n+=1
print(n)

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())
if (x >= 2):
    print(2)
    exit()
prime_list = [2]
for num in range(3,10**5,2):
    if all(num % prime != 0 for prime in prime_list):
        prime_list.append(num)
        if (num >= x):
            print(num)
            exit()

prime_list = [2]
for num in range(3,10**5,2):
    if all(num % prime != 0 for prime in prime_list):
        prime_list.append(num)
        if (num >= x):
            print(num)
            exit()
print(100003)

import math
x = int(input())
if (x <= 2):
    print(2)
    exit()
ans = 100003
if (x%2 == 0):
    x += 1
for num in range(x, 10**5, 2):
    flag = True
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if(num % i == 0):
            flag = False
            break
    if(flag):
        ans = num
        break
print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import math

def main():
  N = int(input())
  
  if N==2:
    print(2)
  else:
    print(search(N))


def search(x):
  
  
  ints = list(range(3,x))
  
  
  for i in ints:
    
    
    if x%i==0:
      seartch(x+2)
  	elif x < i**2:
      break
    
  return x
    

import math
 
def main():
  N = int(input())
  
  print(search(N))
 
def search(x):
  
  ints = list(range(2,x))
  
  
  for i in ints:
    if x%i==0:
      seartch(x+1)
  	elif x < i**2:
      break
    
  return x

import math
 
def main():
  N = int(input())
  
  print(search(N))
 
def search(x):
  
  ints = list(range(2,x))
  
  
  for i in ints:
    if x%i==0:
      return seartch(x+1)
  	elif x < i**2:
      break
    
  return x

import math
 
def main():
  N = int(input())
  
  print(search(N))
 
def search(x):
  
  ints = list(range(2,x))
  
  
  for i in ints:
    if x%i==0:
      return search(x+1)
  	elif x < i**2:
      break
    
  return x

def main():
  N = int(input())
  
  print(search(N))
 
def search(x):
  
  ints = list(range(2,x))
  
  
  for i in ints:
    if x%i==0:
      return search(x+1)
    elif x < i**2:
      break
    
  return x

main()

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
import math
A = int(input())
i = 0
S = 0
B = int(math.sqrt(A))
while i == 0:
    S = 0
    B = int(math.sqrt(A))
    for n in range(2,B + 1):
        if A % n == 0:
            print("A")
            A += 1
            S = 1
            break
    if S == 0:
        print(A)
        exit()

A = int(input())
i = 0
S = 0
B = int(math.sqrt(A))
while i == 0:
    S = 0
    B = int(math.sqrt(A))
    for n in range(2,B + 1):
        if A % n == 0:
            A += 1
            S = 1
            break
    if S == 0:
        print(A)
        exit()

A = int(input())
i = 0
S = 0
B = int(math.sqrt(A))
while i == 0:
    S = 0
    B = int(math.sqrt(A))
    for n in range(2,B + 1):
        if A % n == 0:
            A += 1
            S = 1
            break
    if S == 0:
        print(A)
        exit()

import math
A = int(input())
i = 0
S = 0
B = int(math.sqrt(A))
while i == 0:
    S = 0
    B = int(math.sqrt(A))
    for n in range(2,B + 1):
        if A % n == 0:
            A += 1
            S = 1
            break
    if S == 0:
        print(A)
        exit()

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
n=int(input())

def is_prime(n):
    if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True

for i in range(i,i+30):
  if is_prime(i):
    print(i)

n=int(input())
 
def is_prime(n):
    if n < 2:
      return False
    else:
      for i in range(2, n):
        if i * i > n:
            break
        elif n % i == 0:
            return False
    return True

for i in range(n,n+400):
  if is_prime(i):
    print(i)
    break

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
=int(input())

for i in range(X,X*2):
    ok=0
    for j in range(2,i):
        if i%j == 0:
            ok += 1
    if ok == 0:
        print(i)
        break

X=int(input())

for i in range(X,X*2):
    ok=0
    for j in range(2,i):
        if i%j == 0:
            ok += 1
    if ok == 0:
        print(i)
        break

Verdicts: Runtime Error

Accepted
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
x = int(input())


while True:
	for i in range(2, x**0.5+1):
		if x%i==0:
			x += 1
			break

	print(x)
	break

	

x = int(input())


while True:
	for i in range(2, x**0.5+1):
		if x%i==0:
			continue
	else:
		print(x)
		break
	x += 1
	

x = int(input())


while True:
	for i in range(2, int(x**0.5)+1):
		if x%i==0:
			x += 1
			break

	print(x)
	break

	

x = int(input())


while True:
	for i in range(2, int(x**0.5)+1):
		if x%i==0:
			x += 1
			break
	else:
		print(x)
		break

	

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted