TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Find the minimum prime number greater than or equal to X.

Submission attempts (in order):
def isprime(n):
  if n<10:
    return n in (2,3,5,7)
  for i in range(int(2,sqrt(n)+1)):
    if n%i==0:
      return False
  return True

x = int(input())
for d in range(x,x+300):
  if isprime(d):
    print(d)
    break

from math import *

def isprime(n):
  if n<10: return n in (2,3,5,7)
  for i in range(2,int(sqrt(n)+1)):
    if n%i==0:
      return False
  return True

x = int(input())
for d in range(x, x+300):
  if isprime(d):
    print(d)
    break

Verdicts: Runtime Error

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

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

if n == 8 or n ==9:
  print(11)
  i = 0
elif n == 2 or n== 3 or n == 5 or n == 7:
  print(n)
  i = 0
elif n <= 7 and n%2 == 0:
  print(n+1)
  i = 0

while i != 0:
  j = 3
  js = int(math.sqrt(i))
  while j <= js:
    if  i%j == 0:
      break
    elif j == js or j == js-1:
      print(i)
      break
      i = 0
    else:
      if j%2 == 0:
        j += 1
      else:
        j += 2
  if i%2 == 0:
    i += 1
  else:
    i += 2

import math
n = int(input())
i = n

if n == 8 or n ==9:
  print(11)
  i = 0
elif n == 2 or n== 3 or n == 5 or n == 7:
  print(n)
  i = 0
elif n <= 6 and n%2 == 0:
  print(n+1)
  i = 0

while i > 0 :
  j = 3
  js = int(math.sqrt(i))
  while j <= js:
    if  i%j == 0:
      break
    elif j == js or j == js-1:
      print(i)
      i = -2
      break
    else:
      if j%2 == 0:
        j += 1
      else:
        j += 2
  if i%2 == 0:
    i += 1
  else:
    i += 2

import math
n = int(input())
i = 11

if n == 8 or n ==9:
  print(11)
  i = 0
elif n == 2 or n== 3 or n == 5 or n == 7:
  print(n)
  i = 0
elif n <= 7 and n%2 == 0:
  print(n+1)
  i = 0

while i != 0:
  j = 3
  js = int(math.sqrt(i))
  while j <= js:
    if  i%j == 0:
      break
    elif j == js or j == js-1:
      print(i)
      break
      i = 0
    else:
      if j%2 == 0:
        j += 1
      else:
        j += 2
  if i%2 == 0:
    i += 1
  else:
    i += 2

x = int(input())
if x <= 3:
  n = x
elif x == 4:
  n = 5
else:
  n = x
  j = 0
  while j == 0:
    a = int(n/2) + 1
    i = 2
    while i < a:
      if i == a-1:
        j = 1
        i = a
      elif n % i != 0:
        i += 1
      else:
        i = a
        n += 1
print(n)

Verdicts: Runtime Error

Wrong Answer

Time Limit Exceeded

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

Submission attempts (in order):
def is_prime(n):
  for i in range(2, int(2 ** 0.5)):
    if n % i == 0:
      return False
  return True

x = int(input())

while not is_prime(x):
  x += 1

print(x)

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

Verdicts: Wrong Answer

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

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

def primes(z, n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(z, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]

Prime = primes(x, 10**5)
ans = Prime[0]
print(ans)

x =  int(input())
 
def primes(z, n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if (is_prime[i]) and (i>=z) ]

Prime = primes(x, (10**5)+4)
ans = Prime[0]
print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):
import sys
x = int(input())
i = 2
INF = 100001-x
while (i <= x):
    if (x%2 == 0):
        break
    if (x%i == 0 and x != i):
        break
    if (x % i == 0 and x == i):
        print(i)
        sys.exit()

    if (i % 2 == 1):
        i += 2
    else:
        i += 1

while (x <= INF):
    i = max(2,x - 100)
    while(i < x):
        if (x%2 == 0):
            x += 1
            continue
        if (x%i == 0 and x != i):
            break
        if (x % i == 0 and x == i):
            print(x)
            sys.exit()
        else:
            i += 1
    x += 2

import sys
x = int(input())
i = 2
INF = 100001-x
while (i <= x):
    if (x%i == 0 and x != i):
        break
    if (x % i == 0 and x == i):
        print(i)
        sys.exit()

    if (i % 2 == 1):
        i += 2
    else:
        i += 1

while (x <= INF):
    i = max(2,x - 100)
    while(i <= x):
        if (x%2 == 0 ):
            x += 1
            continue
        if (x%i == 0 and x != i):
            x += 2
            break
        if (x % i == 0 and x == i):
            print(i)
            sys.exit()
        else:
            i += 1
    x += 2

import sys
x = int(input())
i = 2
INF = 100000000
while (i <= x):
    if (x%i == 0 and x != i):
        break
    if (x % i == 0 and x == i):
        print(x)
        sys.exit()
    i += 1

while (x < INF):
    i = 2
    while(i <= x):
        if (i % 2 == 0):
            i += 1
            continue

        if (x % 2 == 0):
            x += 1
            continue

        if (x % i == 0 and x != i):
            x += 1
            break

        if (x % i == 0 and x == i):
            print(x)
            sys.exit()

        else:
            i += 2

    x += 1

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())
m = [2,3,5]
z = [0]*x
y = 0

for i in range(7,321):
    c = 0
    for j in range(i):
        if i%(j+1) == 0:
            c += 1
    if c == 2:
        m.append(i)
        
for i in range(x):
    z[i] = i+1

if x>332:  
    for i in range(x):
        for j in range(len(m)):
            if (i+1) % m[j] == 0:
                z[i] = 0
         
    print(max(z))

else:
    for i in range(len(m)):
        if x >= m[i]:
            y = m[i]
    print(y)

x = int(input())
import math

def primes(n):
    a = [True] * (n + 1)
    a[0] = False
    a[1] = False
    for i in range(2, int(math.sqrt(n))+1):
        for j in range(i * 2, n + 1, i):
            a[j] = False
    return [i for i in range(n + 1) if a[i]==True]

a = primes(x*5)

b = [a[i] for i in range(len(a)) if a[i]>=x]
print(min(b))

Verdicts: Wrong Answer

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

Submission attempts (in order):
x=int(input())
while 1:
  for i in range(int(x**0.5+1)):
    if x//i==0:
      x+=1
      break
  else:
    print(X)
    break

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

Verdicts: Runtime Error

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

Submission attempts (in order):
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

n = int(input())
for i in range(n, 10**5+1):
  if is_prime(n):
    print(n)
    exit()

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

n = int(input())
for i in range(n, 10**6):
  if is_prime(i):
    print(i)
    exit()

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math

X = int(input())
x = round(math.sqrt(X), 0)
flag = 0

for i in range(100):
  for j in range(2, x):
    if X % j == 0:
      flag = 1
      break
  if flag == 0:
    break
  else:
    flag = 0
	X += 1

print(X)

import math

X = int(input())
x = round(math.sqrt(X), 0)
flag = 0

for i in range(100):
    for j in range(2, x):
        if X % j == 0:
            flag = 1
            break
    if flag == 0:
        break
    else:
        flag = 0
        X += 1
print(X)

import math

X = int(input())
x = int(round(math.sqrt(X), 0))
flag = 0

for i in range(100):
    for j in range(2, x):
        if X % j == 0:
            flag = 1
            break
    if flag == 0:
        break
    else:
        flag = 0
        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):
x = int(input())


def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1
終わり

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


x = int(input())

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

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


Verdicts: Wrong Answer

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

Submission attempts (in order):
import sympy
x=int(input())
r=sympy.nextprime(50)
print(r)


import sympy
x=int(input())
print sympy.nextprime(x)

x=int(input())
while(x%i<1 for i in range(2,x)):
  x+=1
  break
print(x)

x=int(input())
while(x%i<1 for i in range(2,x)):
  x+=1

print(x)


x=int(input())
while(x%i<1 for i in range(2,x)):
  x+=1
print(x)


x = int(input())
while any(x % i < 1 for i in range(2, x)): 
    x += 1
print(x)

Verdicts: Runtime Error

Runtime Error

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):
import math

x = int(input())
while x > 0:
  for i in range(2, math.floor(x**(1/2))):
    if x % i == 0:
      print(x)
      break
  else:
    x += 1

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

import math

x = int(input())
while x > 0:
  for i in range(2, math.floor(x**(1/2))):
    if x % i == 0:
      x += 1
      break
  else:
    print(x)
    break

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())

def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

def main():
  if is_prime(X) == True:
    print(X)
  else:
    return is_prime(X+1)

if __name__ == '__main__':
  main()

def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

def main(X):
  if is_prime(X) == True:
    print(X)
  else:
    return main(X+1)

if __name__ == '__main__':
  X = int(input())
  main(X)

Verdicts: Wrong Answer

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

Submission attempts (in order):
MAX_SIZE = 10001

isprime = [True] * MAX_SIZE 
prime = [] 
SPF = [None] * (MAX_SIZE) 

def m_seive(N): 
  isprime[0] = isprime[1] = False
  for i in range(2, N): 
    if isprime[i]: 
      prime.append(i) 
      SPF[i] = i 
      j = 0
      while (j < len(prime) and i * prime[j] < N and \
             prime[j] <= SPF[i]):
        isprime[i * prime[j]] = False
        SPF[i * prime[j]] = prime[j]
        j += 1
		
def program():
  x = int(input())
  N = 10000
  m_seive(N) 
    
  for i in range(len(prime)):
    if prime[i] >= x:
      return prime[i]
      break
		
print(program())


isprime = [True] * 100201

def seive(n): 
  isprime[0] = isprime[1] = False
  p = 2
  while (p*p <= n):
    if isprime[p]:
      for i in range(p*p, n+1, p):
        isprime[i] = False   
    p += 1
      
  prime = [j for j in range(n) if isprime[j]]
  return prime

		
def program():
  x = int(input())
  N = 100200
  prime = seive(N) 
    
  for i in range(len(prime)):
    if prime[i] >= x:
      return prime[i]
      break
		
print(program())


Verdicts: Wrong Answer

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

Submission attempts (in order):

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


# input
X = int(input())

while is_prime(X) is True:
    X += 1
else:
    print(X)


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


# input
X = int(input())

while is_prime(X) is False:
    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
K = int(input())
if K==2: print(K)
else:
if K%2 ==0:K+=1
        while True:
                flg =0
                N = int(math.sqrt(K))
        
                for i in range(2,N):
                        if K%i == 0:
                        
                                flg = 1
                                break
                if flg == 0:
                        print(K)
                        break
                K+=2

import math
K = int(input())
if K==2: print(K)
else:
        if K%2 ==0:K+=1
                while True:
                        flg =0
                        N = int(math.sqrt(K))
        
                        for i in range(2,N):
                                if K%i == 0:
                        
                                        flg = 1
                                        break
                        if flg == 0:
                                print(K)
                                break
                        K+=2

import math
K = int(input())
if K==2: print(K)
else:
        if K%2 ==0:
                K+=1
        while True:
                flg =0
                N = int(math.sqrt(K))
        
                for i in range(2,N):
                        if K%i == 0:
                        
                                flg = 1
                                break
                if flg == 0:
                        print(K)
                        break
                K+=2

Verdicts: Runtime Error

Runtime Error

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

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

def is_sosu(num):
  st = 2
  while st <= num:
    if num % st == 0:
      print(num)
      return
    st += 1
  is_sosu(num+1)

is_sosu(int(x))

x = input()

def is_sosu(num):
  st = 2
  while True:
    if num % st == 0:
      print(num)
      return
    st += 1
    if st < num:
      break
  is_sosu(num+1)

is_sosu(int(x))

x = input()

def is_sosu(num):
  st = 2
  while st <= num:
    if num % st == 0:
      print(num)
      return
    st += 1
  else:
    st += 1
    if num == st:
      is_sosu(num+1)

is_sosu(int(x))

x = map(int, input())

def is_sosu(num):
  st = 2
  if num % st == 0:
    print(num)
  else:
    st += 1
    if num == st:
      is_sosu(num+1)

is_sosu(x)

x = input()

def is_sosu(num):
  st = 2
  while True:
    if num % st == 0:
      print(num)
      return
    st += 1
    if st == num:
      break
  is_sosu(num+1)

is_sosu(int(x))

x = map(int, input())

def is_sosu(num):
  st = 2
  while st <= num:
    if num % st == 0:
      print(num)
      return
    st += 1
  else:
    st += 1
    if num == st:
      is_sosu(num+1)

is_sosu(x)

x = input()

def is_sosu(num):
  st = 2
  while True:
    if num % st == 0:
      break
    st += 1
  if st == num:
    print(num)
    return
  is_sosu(num+1)

is_sosu(int(x))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

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

Submission attempts (in order):
X=input()
X=X-1
a=0
b=1
while b==1:
    X=X+1
    a=0
    for i in range(2,X):
        if X%i==0:
            a=a+1
    if a==0:
        print(X)
        break;


X=int(input())
X=X-1
a=0
b=1
while b==1:
    X=X+1
    a=0
    for i in range(2,X):
        if X%i==0:
            a=a+1
    if a==0:
        print(X)
        break;


Verdicts: Runtime Error

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

Submission attempts (in order):
X = int(input())
XX=np.arange(X,X+10**4)

s=0
for j in XX:
    if (s==1):
        break
    for i in range(2, j+1):
        N= j % i
#        print('j=' ,j ,' i=' ,i, N)
        if (N ==  0 and i==j ):
            print(j)
            s=1
        if (N ==  0):
          #  print('true')
            break
#        else:
#            print(j)


X = int(input())
XX=np.arange(X,X+10**4)

s=0
for j in XX:
    if (s==1):
        break
    for i in range(2, j+1):
        N= j % i
#        print('j=' ,j ,' i=' ,i, N)
        if (N ==  0 and i==j ):
            print(j)
            s=1
        if (N ==  0):
          #  print('true')
            break
#        else:
#            print(j)

import numpy as np
#import copy
#import fractions
#

#a, b, c, d = map(int, input().split())  # a=2 b=4 c=5 d =7
#a = list(map(int, input().split()))     # a = [2, 4, 5, 6]


##3
##hoge
##foo
##bar
#n=int(input())

#

#a=[0]*5 #[0, 0, 0, 0, 0]


#

#a = 0.364364
#print(a) #0.364364
#print("{:.6f}".format(a)) #0.364364

#





#





#


#listA=[1,2,5,2,4,6,7,8,6,56,3,56,76,34,32,2,6,0,32,6,0] 
#listA.sort()


#
#

#import fractions
#a,b=map(int, input().split())
#a,b= 24, 6
#f=fractions.gcd(a,b)
#f2=a*b//f
#print(f,f2)
#









X = int(input())
XX=np.arange(X,X+10**4)

s=0
for j in XX:
    if (s==1):
        break
    for i in range(2, j+1):
        N= j % i
#        print('j=' ,j ,' i=' ,i, N)
        if (N ==  0 and i==j ):
            print(j)
            s=1
        if (N ==  0):
          #  print('true')
            break
#        else:
#            print(j)



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())
flag = 1

while True:
    if x == 2:
        break
    for i in range(3, x):
    #print("i is " + str(i))
    if x % i == 0:
        flag = 0
        break
    if flag == 1:
        break
    else:
        flag=1
        x += 1
print(x)

x = int(input())
flag = 1

while True:
    if x == 2:
        break
    for i in range(3, x):
    #print("i is " + str(i))
        if x % i == 0:
            flag = 0
            break
    if flag == 1:
        break
    else:
        flag=1
        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=int(input())
while True:
    for x in range(2,X):
        if X%x==0:
            break
    else:
        print(x)
        break
    X+=1

X=int(input())
while True:
    for x in range(2,X):
        if X%x==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())

while True:
    if x % 2 == 0:
        x += 1
        continue
    i = 1
    while i * i <= x:
        if x % i == 0:
            break
        i += 1
    else:
        print(x)
        exit()
    x += 1


x = int(input())
while True:
    i = 2
    while i * i <= x:
        if x % i == 0:
            break
        i += 1
    else:
        print(x)
        exit()
    x += 1


Verdicts: Time Limit Exceeded

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

Submission attempts (in order):
pip install sympy
from sympy import isprime

x = int(input())
if x % 2 == 0:
  x += 1

flag = True

while flag == True:
  if isprime(x) == True:
    flag = False

print(x)

from sympy import isprime

x = int(input())
if x % 2 == 0:
  x += 1

flag = True

while flag == True:
  if isprime(x) == True:
    flag = False

print(x)

x = int(input())

def isprime(s):
  if s>2 and s%2==0:
    return False
  else:
    flg = True
    for i in range(3, s//2+1, 2):
      if s%i == 0:
        flg = False
        break
    return flg

for i in range(x, 10**6):
  if isprime(i) == True:
    print(i)
    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())
for i in range(x,10**5):
  for p in range(2,x+1):
    if i%p==0:
      print(i)
      break

x=int(input())
for i in range(x,10**6):
    for j in range(2,i):
        if i%j==0:
            break 
    else:
         print(i)
         break

Verdicts: Wrong Answer

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

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

while(1):
  for i in range(2,X):
    if X%i == 0:
      X += 1
      break
    if i == X-1:
      break

print(X)

X = int(input()) 

while(1):
  if X == 2:
    break
  for i in range(2,X):
    if X%i == 0:
      X += 1
      break
  if i == X-1:
      break

print(X)

Verdicts: Runtime Error

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

Submission attempts (in order):
def is_prime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False
    return n != 1:
        

x = int(input())
while not is_prime(x):
    x += 1
print(x)

def is_prime(n):
    if n == 1:
        return False
    return all(n % i != 0 for i in range(2, int(n**0.5) + 1))

x = int(input())
while not is_prime(x):
    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 = int(input())

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

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

print(X)

X = int(input())

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

while isprime(X)==False:
    isprime(X)
    X = X + 1

print(X)

X = int(input())

def isprime(n):
    if n < 2:
    
        return False
    if n == 2:
    
        return True
    for p in range(2, n):
        if n % p == 0:
            break
    else:
        return True  

while True:
    isprime(X)
    if isprime(X) == True:
        break
    else:
        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):
import math
X=int(input())
n=math.sqrt(X)
if X==2:
  print(X)
else:
  for i in range(2,n):
    if X%i==0:
      X+=1
  print(X)


from 
X=int(input())
if X==2:
  print(X)
else:
  for i in range(2,X**(1/2)):
    if X%i==0:
      X+=1
  print(X)

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
cnt = 0
for i in range(n):
  if a[i] <= b[i]:
    cnt += a[i]
    b[i] -= a[i]
    if b[i] >= a[i+1]:
      cnt += a[i+1]
      a[i+1]=0
    else:
      cnt += b[i]
      a[i+1] -= b[i]
  else:
    cnt += b[i]
print(cnt)

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

X=int(input())
y=0
if X==2:
  print(X)
else:
  for i in range(2,X/2):
    if X%i==0:
      X+=1
  print(X)


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


X=int(input())
y=0
if X==2:
  print(X)
else:
  for i in range(X-2):
    if X%(2+i)==0:
      X+=1
    else:
      print(X)
      exit()

import math
X=int(input())
while True:
    for i in range(2,int(math.sqrt(X))+1):
      if X%i==0:
        X+=1
        break
    else:
      print(X)
      break

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

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

Submission attempts (in order):
x = int(input())
val = []
prime = []
for i in range(2,100000):
    val.append(i)
while len(val) != 0:
    prime.append(val[0])
    val = [i for i in val if i % val[0] != 0]

#print(val)

ans = 2
for i in prime:
    if i >= x:
        ans = i
print(ans)

x = int(input())
val = 0
ans = 0
for i in range(x, int(1e20)):
    if i % 2 == 0 and i !=2:
        continue
    for j in range(2,i+1):
        if i == j:
            val = 1         
        
        
        if i % j == 0:
            break

          
    if val == 1:
        ans = i
        break
    
print(ans)

Verdicts: Time Limit Exceeded

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

Submission attempts (in order):

from fractions import gcd
a, b = map(int, input().split())

print((a*b)//gcd(a, b))

import math
a, b = map(int, input().split())

print(int((a*b)//math.gcd(a, b)))


from fractions import gcd
a, b = map(int, input().split())

print(int((a*b)//gcd(a, b)))

x = int(input())

ans = 0

for _ in range(10**5):
    if x == 2:
        print(x)
        break
    for i in range(2, int(x**0.5) + 1):
        if (x % i) == 0:
            break
        elif i == int(x**0.5): 
            ans = x
        else:
            pass

    if ans != 0:
        print(ans)
        break
    else:
        x += 1


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())
prime = [2,3]
j = 3
while prime[-1] < 1000:
    j = j + 2
    i = 1
    pr = True
    while prime[i]*prime[i] <= j:
        if j % prime[i] == 0:
            pr = False
            break
        i = i+1
    if pr == True:
        prime.append(j)
        
newprime = 0
while newprime == 0:
    pr = True
    for i in range(len(prime)):
        if x %  prime[i] == 0:
            pr = False
            break
    if pr == True:
        newprime = x
    x = x+1
print(newprime)

x = int(input())
prime = [2,3]
j = 3
while prime[-1] < 1000:
    j = j + 2
    i = 1
    pr = True
    while prime[i]*prime[i] <= j:
        if j % prime[i] == 0:
            pr = False
            break
        i = i+1
    if pr == True:
        prime.append(j)
        
newprime = 0
while newprime == 0:
    pr = True
    for i in range(len(prime)):
        if x == prime[i]:
            newprime = x
            break
        elif x %  prime[i] == 0:
            pr = False
            break
    if pr == True:
        newprime = x
    x = x+1
print(newprime)

Verdicts: Wrong Answer

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

Submission attempts (in order):
def resolve():
    def is_prime(n):
      	import math
        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)
            return
        else:
            X += 1
 
    return
 
resolve()

def resolve():
    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)
            return
        else:
            X += 1

    return

resolve()

def resolve():
    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)
            return
        else:
            X += 1

    return
  
  
resolve()

import math
def resolve():
    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)
            return
        else:
            X += 1
 
    return
 
resolve()

Verdicts: Runtime Error

Runtime Error

Runtime Error

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

Submission attempts (in order):
# -*- coding: utf-8 -*-
import numpy as np
from collections import deque
x = int(input())


prim_numbers = []
for divider in range(2, int(np.sqrt(x))):
    if x % divider == 0:
        continue
    else:
        prim_numbers.append(divider)


def is_primt(q):
    for divider in prim_numbers:
        if q % divider == 0:
            return False
    return True


while True:
    if is_primt(x):
        print(x)
        exit()
    else:
        x += 1
        continue


# -*- coding: utf-8 -*-
import numpy as np
from collections import deque
x = int(input())


prim_numbers = [2]
for divided in range(3, x, 2):
    for prim in prim_numbers:
        if divided % prim == 0:
            continue
        else:
            prim_numbers.append(divided)
            break


def is_prim(q):
    for divider in prim_numbers:
        if q % divider == 0:
            return False
    return True



if x == 2:
    print(x)
    exit()

if x % 2 == 0:
    x += 1
while True:
    if is_prim(x):
        print(x)
        exit()
    else:
        x += 2
        continue


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())
for i in range(n,10**6):
  for j in range(2,int(math.sqrd(i**0.5))+1):
    if i%j==0:
      break
  else:
    print(i)
    break


import math
n=int(input())
if n==2:
    print(n)
else:
    cost=0
    for i in range(n,10**6):
        for j in range(2,int(math.sqrt(i))+1):
            if i%j==0:
                cost+=1
        if cost==0:
            print(i)
            break


n=int(input())
for i in range(n,10**5):
  for j in range(2,10*5):
	if i%j==0:
      print(i)
      quit()

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

Verdicts: Runtime Error

Time Limit Exceeded

Runtime Error

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

Submission attempts (in order):
x = int(input())
while not all(x % i for i in range(2, x)):
    x += 1

x = int(input())
while not all(x % i for i in range(2, x)):
    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

X = int(input())

l = [True] * 1000001
l[0], l[0] = False, False

for i in range(1, 1000+1):
  if l[i]:
    if i >= X:
      print(i)
      break
    else:
      for j in range(2*i, 1000000, i):
        l[j] = False

import math
 
X = int(input())
 
for i in range(X, 100004):
  f = True
  for j in range(2, int(math.sqrt(X))+1):
    if i % j == 0:
      f = False
      break
  if f:
    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
N = int(input())
def main(val):
  for i in range(2,math.floor(math.sqrt(val)):
   if val % i == 0:
     return True
  return False
while(True):
  if main(N) == False:
	print(N)
	break
  N += 1

import math
N = int(input())
def main(val):
  for i in range(2,int(math.sqrt(val))):
    if val % i == 0:
      return True
  return False
while(True):
  if main(N) == False:
    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):
p = int( input())
import math

print( math.sqrt( p ) )
while True:
  is_composite_number = False
  for i in range( 2, int( math.sqrt( p ))):
    is_composite_number = is_composite_number or ( p % i == 0 )
  if not is_composite_number:
    break
  p += 1
print( p )
      

p = int( input())
import math

while True:
  is_composite_number = False
  for i in range( 2, int( math.sqrt( p ))):
    is_composite_number = is_composite_number or ( p % i == 0 )
  if not is_composite_number:
    break
  p += 1
print( p )
      

Verdicts: Wrong Answer

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

Submission attempts (in order):
def prime(n):
  prime_table = [2]
  for i in range(3,n+1):
    f = 1
    for j in prime_table[:bisect.bisect_right(prime_table,int(i**0.5))]:
      if i % j == 0:
        f = 0
        break
    if f:
      prime_table.append(i)
  return prime_table

import bisect
n = int(input())
prime_table = prime(10**6)
print(prime_table[bisect.bisect_left(prime_table,n)])

def prime(n):
  prime_table = [2]
  for i in range(3,n+1):
    f = 1
    for j in prime_table[:bisect.bisect_right(prime_table,int(i**0.5))]:
      if i % j == 0:
        f = 0
        break
    if f:
      prime_table.append(i)
  return prime_table

import bisect
x = int(input())
pt = prime(5*10**5)
print(pt[bisect.bisect_left(pt,x)])

Verdicts: Time Limit Exceeded

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

Submission attempts (in order):
import math
x = int(input())
if x % 2 == 0:
  n += 1
else:
  n += 2
while True:
  isPrime = True
  for i in range(2, int(math.sqrt(n))):
    if n % i == 0:
      isPrime = False
      break
  if isPrime:
    print(n)
    break
  n += 2

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

import math
x = int(input())
n = x
while True:
  isPrime = True
  for i in range(2, int(math.sqrt(n))):
    if n % i == 0:
      isPrime = False
      break
  if isPrime:
    print(n)
    break
  n += 1


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())
E = [1] * (2 * X)
for i, e in enumerate(E):
  if i < 1:
    continue
  if e < 1:
    continue
  for j in range(2 * i, 2 * X, i):
    E[j] = 0
for i, e in enumerate(E):
  if i < X:
    continue
  if e < 1:
    continue
  print(i)
  break

X = int(input())
E = [1] * (2 * X)
for i, e in enumerate(E):
  if i < 2:
    continue
  if e < 1:
    continue
  for j in range(2 * i, 2 * X, i):
    E[j] = 0
for i, e in enumerate(E):
  if i < X:
    continue
  if e < 1:
    continue
  print(i)
  break


Verdicts: Wrong Answer

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)
else:
  for i in range(X,10**6):
    for j in range(2,i):
      if i%j==0:
        break
      if j==i-1:
        print(i)
        exit()


X=int(input())
if X==2:
  print(2)
else:
  for i in range(X,10**6):
    for j in range(2,i):
      if i%j==0:
        break
      if j==i-1:
        print(i)
        exit()

Verdicts: Runtime Error

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

Submission attempts (in order):
import math
import sys
sys.setrecursionlimit(100000)

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())

def findPrime(x):
  if is_Prime(x):
    return x
  else:
    return findPrime(x+1)

print(findPrime(X))

import math
import sys
sys.setrecursionlimit(100000)

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())

def findPrime(x):
  if is_prime(x):
    return x
  else:
    return findPrime(x+1)

print(findPrime(X))

Verdicts: Runtime Error

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

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



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



Verdicts: Runtime Error

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

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

import sys
x=int(input())
for i in range(x,2*x+1):
  for j in range(2,int(i**0.5)+1):
    if i%j==0:
      break
  else:
    print(i)
    sys.exit()

Verdicts: Runtime Error

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

Submission attempts (in order):
X = map(int,input().split())
from sympy import sieve
L = [i for i in sieve.primerange(X,23)]
print(L[0])

X = int(input())
def price(n):
  if n == 1:
    return False
  for i in range(2, int(n**0.5)+1):
    if n%i == 0:
      return False
  return True

while 1:
  if price(X):
    print(X)
  else:
    X += 1

X = int(input())
def price(n):
  if n == 1:
    return False
  for i in range(2, int(n**0.5)+1):
    if n%i == 0:
      return False
  return True

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

Verdicts: Runtime Error

Time Limit Exceeded

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

Submission attempts (in order):
x=int(input())
N=1000003
primes=[i for i in range(2,N+1)]
p=min(primes)
seen=[]
while p<N**0.5:
    i=2
    while p*i<N:
        if p*i in primes:
            primes.remove(p*i)
        i+=1
    seen.append(p)
    for i in primes:
        if i not in seen:
            p=i
    
for i in range(len(primes)):
    if primes[i]>x:
        ans=i
        break
print(primes[i])
    

x=int(input())

def is_prime(x):
    if x<=1:
        return False
    for i in range(2,int(x**0.5)):
        if x%i==0:
            return False
    return True

p=x
while not is_prime(p):
    p+=1
print(p)
    

Verdicts: Time Limit Exceeded

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

Submission attempts (in order):
while True:
    i = 2
    ok = True
    while i * i <= x:
        if x % i == 0:
            ok = False
            break
        i += 1
    if ok:
        print(x)
        break
    x += 1

x = int(input())

while True:
    i = 2
    ok = True
    while i * i <= x:
        if x % i == 0:
            ok = False
            break
        i += 1
    if ok:
        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):
def is_prime2(q,k=100):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    for i in xrange(3,k):
        x,y = q,i
        while y:
            x, y =  y, x % y
        if x != 1: continue
        if pow(i, q-1, q) != 1:
            return False
    return True

X=int(input())
def is_prime(q,k=100):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    for i in range(3,k):
        x,y = q,i
        while y:
            x, y =  y, x % y
        if x != 1: continue
        if pow(i, q-1, q) != 1:
            return False
    return True
flag=False
while(flag==False):
    if is_prime(X):
        print(X)
        flag=True
        break
    X+=1

Verdicts: Wrong Answer

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

Submission attempts (in order):
import math
x = int(input())
ans =x
while True:
  for i in range(2,math.sqrt(x)+1):
    if x%i=0:
      print(x)
      exit()
  x+=1
  


import math
x = int(input())
ans =x

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

Verdicts: Runtime Error

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

Submission attempts (in order):
from sympy import nextprime

X = int(input())
p = sympy.nextprime(X, 1)

print(p)

from sympy import nextprime
import sympy
import isprime

X = int(input())

if isprime(X) = "True":
    print(X)

else:
    p = sympy.nextprime(X, 1)
    print(p)

N = int(input())

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

for x in range(N, 1000000):
    if prime_check(x):
        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):
n = int(input())

import math
def prime(n):
  a = math.ceil(sqrt(n))
  for i in range(2,a):
    if n%i==0: return 1
  return 0

while (1):
  n += 1
  if prime(n)==1: 
    print(n)
    exit()

x = int(input())

def prime(n):
  a = int(n**(1/2))
  for i in range(2,a+1):
    if n%i==0: return False
  return true

while (1):
  if prime(x)==False: x += 1
  else: break
  x += 1
print(x)


x = int(input())

def prime(n):
  a = int(n**(1/2))
  for i in range(2,a+1):
    if n%i==0: return False
  return True

while (1):
  if prime(x)==False: x += 1
  else: break
  x += 1
print(x)


x = int(input())

def prime(n):
  a = int(n**(1/2))
  for i in range(2,a+1):
    if n%i==0: return False
  return True

while (1):
  if prime(x)==False: x += 1
  else: break
print(x)

Verdicts: Runtime Error

Runtime Error

Time Limit Exceeded

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

Submission attempts (in order):
def isPrime(n):
  if n == 2:
    return True
  for p in range(2, n):
      if n % p == 0:
        return False
  return True

x = float(input())
while True:
  if isPrime(x):
    print(x)
    break
  x = x+1

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

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

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):
        print(i)
        if x % i == 0:
            break 
    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:
            break 
    else:
        print(x)
        break 
    x += 1

Verdicts: Wrong Answer

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

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

while True:
    if (13**X -13 )%X==0:
        print(X)
        exit(0)

    X+=1


X=int(input())

while True:
    if (11**X -11 )%X==0:
        print(X)
        exit(0)

    X+=1


X=int(input())


while True:

    flg = 0
    for i in range(1,X+1):
        if X%i==0:
            if i!=1 and  i!=X:
                flg=1
    
    if flg == 0:
        break

    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())
X = X + 1
while True:
    for i in range(0, X):
        if X % i == 0:
            prime = X
            break
        else:
            X += 1
print(X)

X = int(input())
prime = None
while True:
    for i in range(2, X):
        if X % i == 0:
            break
    else:
        prime = X
    if prime != None:
        break
    else:
        X += 1

print(prime)

Verdicts: Runtime Error

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

Submission attempts (in order):
X = int(input())
i = int(n**0.5)

while i >= 2:
    if X % i == 0:
        X += 1
        i = int(X**0.5)
    else:
        i -= 1
        
print(X)

X = int(input())
i = int(n**0.5)

while i >= 2:
    if X % i == 0:
        X += 1
        i = int(X**0.5)
    else:
        i -= 1
        
print(X)

X = int(input())
i = int(X**0.5)

while i >= 2:
    if X % i == 0:
        X += 1
        i = int(X**0.5)
    else:
        i -= 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 main():
    x = int(input())

    primes = [2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313]

    if x == 2:
        return 2
    x += (x+1)%2
    while True:
        isPrime = True
        for p in primes:
            if x % p == 0:
                isPrime = False
                break
        if isPrime:
            return x
        else:
            x += 2

if __name__ == "__main__":
    print(main())

def main():
    x = int(input())

    primes = [3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313]

    if x == 2:
        return 2
    x += (x+1)%2
    while True:
        isPrime = True
        for p in primes:
            if x == p:
                return p
            if x % p == 0:
                isPrime = False
                break
        if isPrime:
            return x
        else:
            x += 2

if __name__ == "__main__":
    print(main())

Verdicts: Wrong Answer

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

Submission attempts (in order):
from fractions import gcd

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

def lcm(x, y):
    return (x*y)//gcd(x,y)
    
tmp = lcm(a, b)
print(tmp)

x = int(input())

ans = 0

for i in range(x, 100004):
    tmpf = 1
    for j in range(2, int(i**0.5)):
        if i % j == 0:
            tmpf = 0
            break
    if tmpf == 1:
        ans = i
        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());

for i in range(x + 1, 10**5 + 1):
  for k in range(1, i):
    if i % k != 0: 
      continue;
    else: 
      break;
  else:
    continue;
  break;
  
print(i)
      

x = int(input());

for i in range(x, 10**6):
  for k in range(2, i):
    if i % k != 0: 
      continue;
    else: 
      break;
  else:
    break;
  
print(i)

Verdicts: Runtime Error

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

Submission attempts (in order):
n=int(input())
prime=0
tmp = n
while prime == 0:
  for i in range(2,int(n**0.5)+1):
    if tmp%i==0:
      prime=tmp
  tmp+=1
print(prime)

n=int(input())
prime=0
tmp = n
while prime == 0:
  flag=True
  for i in range(2,int(n**0.5)+1):
  	flag=False
    break
  if frag:
    prime=tmp
  tmp+=1
print(prime)


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


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
while True:
    for i in range(2, ans):
        if ans % i == 0:
            ans += 1
            break
    print(ans)
    break


X = int(input())


ans = X
if ans == 2:
    print(ans)
    exit()
while True:
    for i in range(2, ans):
        if ans % i == 0:
            ans += 1
            break
        elif i == ans - 1:
            print(ans)
            exit()


Verdicts: Wrong Answer

Accepted