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

Submission attempts (in order):
a = int(input())
ans = 0
flag = True
i=2
while flag:
  if a%i==0:
    ans = a
    flag = False
  i+=1
print(ans)

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

if a+b<=n:
  a=0
  b=0
else:
  if n>a:
    b-=(n-a)
    a=0
    if b<0:
      b=0
  else:
    a=n-a

print("%d %d" %(a,b))

import math

def Is(x):
  flag = False
  i = 2
  while i<math.sqrt(x):
    if x%i==0:
      flag = True
      break
      i+=1
  return flag

a = int(input())
ans = 0
flag2 = True
i = 0
while flag2:
  flag2 = Is(a+i)
  ans = a+i
  i+=1

print(ans)

import math

def Is(x):
  flag = False
  i = 2
  while i < math.sqrt(x):
    if x % i==0:
      flag = True
      break
    i += 1
  return flag

a = int(input())
ans = 0
flag2 = True
i = 0
while flag2:
  flag2 = Is( a + i )
  ans = a + i
  i += 1

print(ans)

Verdicts: Wrong Answer

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())
for i in range(x,x+1000):
  if all([i%j!=0 for j in range(2,1000)]):
    print(i)
    break

x = int(input())
end = int(x**(1/2))
for i in range(x,x+1000):
  if all([i%j!=0 for j in range(2,end)]):
    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())


def prime_or_not(a):
  b = 0
  for i in range(a):
    if a % (i + 1)== 0:
      b += 1
    else:
      pass
    if b >= 1:
      return 1
    else:
      return 0

ans = 0

while ans <1:
  ans += prime_or_not(x)
  x += 1
print(x - 1)

x = int(input())


def prime_or_not(a):
  b = 0
  for i in range(a):
    if a % i == 0:
      b += 1
    if b >= 1:
      return 0:
    else:
      return 1:

ans = 0

while ans =< 0:
  ans += primt_or_not(a)
  a += 1
print(a - 1)

x = int(input())



def prime_or_not(a):
  b = 0
  i = 2

  if a == 2:
    ans = True
    
  else:
    while i <= a - 1 and b < 1:
      if a % (i)== 0:
        b += 1
        i += 1
      else:
        i += 1
      
      if b >= 1:
        ans = False
      else:
        ans = True

    return ans

ans = 0

if x == 2:
  print(2)
else:
  while ans <1:
    ans += prime_or_not(x)
    x += 1
  print(x - 1)


Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
def com(_x):
    _flg = 1
    mx  = int(_x**0.5)
    for i in range(2, mx+1):
        if _x % i == 0:
            _flg = 0
            break
    return _flg


x = int(input())
flg = 0
  while flg == 0:
      #print("a")
      flg = com(x)
      if flg == 0:
          x+=1
print(x)

x = int(input())
flg = 0
now_flg = 0
while flg == 0:
    mx  = int(x**0.5)
    for i in range(2, mx+1):
        if x % i == 0:
            now_flg = 1
            break
    fig = now_flg
    if flg == 0:
        x+=1
print(x)


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


x = int(input())
flg = 0
_flg = 1
while flg == 0:
    mx  = int(x**0.5)
    for i in range(2, mx+1):
        if x % i == 0:
            _flg = 0
            break
    fig = _flg
    if flg == 0:
        x+=1
print(x)


x = int(input())
flg = 0
now_flg = 1
while flg == 0:
    mx  = int(x**0.5)
    for i in range(2, mx+1):
        if x % i == 0:
            now_flg = 0
            break
    fig = now_flg
    if flg == 0:
        x+=1
print(x)


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


Verdicts: Runtime Error

Time Limit Exceeded

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):
x = int(input())
n = 2

for i in range(10^5):
  while x % n != 0 or n =< x/2:
      n += 1
  if n =< x/2:
    x += 1
    
  else:
    print(x)
    break
      


  	

x = int(input())

while True:
  n = 2
  while x % n != 0 and n <= x/2:
    n += 1
  if n < x/2:
    x += 1
    
  else:
    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())

count = 0

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

X = int(input())

count = 0

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

x = int(input())
p = x - 1
prime = False

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

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
import math
N = int(input())
flag = 0
while flag == 0:
  lst = []
  for i in range(1, math.ceil(N**0.5)):
    if N%i == 0:
      if i**2 = N:
        lst.append(i)
      else:
        lst.append(i)
        lst.append(N//i)
  if len(lst) == 2:
    flag = 1
  else:
    N += 1
print(N)

import math
N = int(input())
flag = 0
while flag == 0:
  lst = []
  for i in range(1, math.ceil(N**0.5)):
    if N%i == 0:
      if i**2 == N:
        lst.append(i)
      else:
        lst.append(i)
        lst.append(N//i)
  if len(lst) == 2:
    flag = 1
  else:
    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())
for i in range(X,120000):
  f = 0
  for j in range(2,math.ceil(math.sqrt(i))):
    if i % j == 0:
      f += 1
      break
  if f == 0:
    print(i)
    break

isPrime=[1 for i in range(10**6+1)]
isPrime[0]=0;isPrime[1]=0
for i in range(2,10**6+1):
    if isPrime[i]==0:
        continue
    for j in range(2*i,10**6+1,i):
        isPrime[j]=0
X=int(input())
for i in range(X,10**6+1):
    if isPrime[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):
X = int(input())
P = [i for i in range(10**5)]
for i in range(2,10**5):
    if i in P:
        n = X//i
        for j in range(1,n):
            if 2*(j+1) in P:
                P.remove(2*(j+1))
P.append(100003)
for i in P:
    if i >= X:
        print(i)
        break

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


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


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

d = 2

while d < 1+x//2:
  if x%d == 0:
    x += 1
    d = 1
  else:
    if d == 1+x//2:
      ans = x
      break
    else:
      d += 1
print(ans)

x = int(input())

d = 2

while d < 1+x//2:
  if x%d == 0:
    x += 1
    d = 2
  else:
    if d == 1+x//2:
      ans = x
      break
    else:
      d += 1
print(ans)

x = int(input())

d = 2

ans = 2

if x != 2:
  while d <= 1+x//2:
    if x%d == 0:
      x += 1
      d = 2
    else:
      if d == 1+x//2:
        ans = x
        break
      else:
        d += 1
  print(ans)
else:
  print(ans)

Verdicts: Runtime Error

Runtime Error

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

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

x = int(input())
 
for val in range(x, x**1000000000) :
	if x ==2 :
		print(x)
		break
	elif ((2** val) % val) == 2 :
		print (val)
		break
	else :
		continue

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

print(x+i)

Verdicts: Wrong Answer

Time Limit Exceeded

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

Submission attempts (in order):
X=int(input())
l=list()
if X<=50000:
  for i in range(X,2*X):
    l.append(i)
else:
  for i in range(X,100000):
    l.append(i)
    
for n in range(2,317):
  for x in l:
    if x%n==0:
      l.remove(x)
print(l[0])

import math
X=int(input())
if X==2:
  print('2')
  exit()
else:
  l=list()
  x=math.sqrt(X)
  key=math.floor(x)
  for i in range(X,(key+1)**2):
    l.append(i)
    
for n in range(2,key+1):
  for x in l:
    if x%n==0:
      l.remove(x)
print(l[0])

Verdicts: Runtime Error

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

Submission attempts (in order):
import math
def main(X):
    if X <= 3:
        return X
    SosuuFlg = False
    while SosuuFlg == False:
        for i in range(2, 101):
            if X % i == 0:
                break
        else:
            SosuuFlg = True
            return X
        X += 1
        
X = int(input())
print(main(X))
        

import math
def main(X):
    if X <= 3:
        return X
    SosuuFlg = False
    while SosuuFlg == False:
        max_search = int(math.sqrt(X)+1) if math.sqrt(X) % 1 == 0 else math.ceil(math.sqrt(X))
        for i in range(2, max_search):
            if X % i == 0:
                break
        else:
            SosuuFlg = True
            return X
        X += 1
        
X = int(input())
print(main(X))

Verdicts: Wrong Answer

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

Submission attempts (in order):
def isPrime(n):
    if n == 1: return False
 
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
  
num = input()
 
res = True
ans = 0
if num > 2 and num%2 == 0:
  num += 1

def isPrime(n):
    if n == 1: return False

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

    return True
  
num = input()

res = True
ans = 0
if num > 2 and num%2 == 0:
  num += 1
while(res):
  if isPrime(num):
    return num
  num += 2
  
  

def isPrime(n):
    if n == 1: return False
 
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
  
num = input()
 
res = True
ans = 0
if num > 2 and num%2 == 0:
  num += 1
while(res):
  if isPrime(num):
    print(num)
    break
  num += 2

def isPrime(n):
    if n == 1: return False
 
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
  
num = input()
 
res = True
ans = 0
if num > 2 and num%2 == 0:
  num += 1
while(res):
  if isPrime(num):
    return num
  num += 2

import math

def isPrime(n):
    if n == 1: return False
 
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
 
    return True
  
num = int(input())
 
res = True
ans = 0
if num > 2 and num%2 == 0:
  num += 1
while(res):
  if isPrime(num):
    print(num)
    break
  num += 2

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):
a = int(input())
b = True
def hantei(n, x):
  for i in range(n):
    if n % i == 0:
      x = not x
      return x
while b is True:
  hantei(a, b)
  a += 1
  if not b:
    print(a)

a = int(input())
b = True
def hantei(n, x): 
    for i in range(2, n):
        if n % i == 0:
            x = True
            return x
while b:
    b = hantei(a, b)
    if b is None:
        print(a)
        break
    a += 1


Verdicts: Runtime Error

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

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

flag = 0

while flag==0:
#check if n is prime or not
	tst = 2
	while n % tst != 0:
    	tst = tst + 1
    if tst==n: 
		flag=1
	else:
		n=n+1
print(n)
    	

n = int(input())
 
flag = 0
 
while flag==0:
#check if n is prime or not
	tst = 2
	while n % tst != 0:
		tst = tst + 1
	if tst==n: 
		flag=1
	else:
		n=n+1
print(n)

Verdicts: Runtime Error

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

Submission attempts (in order):
def resolve():
    X = int(input())
    ans = X
    while True:
        count = 0
        if X != 2 and X != 3 and X != 4 and X != 5 and X != 6:
            for i in range(7, X):
                if X%i == 0:
                    count += 1
            if count == 0:
                print(ans)
                exit()
            else:
                ans += 1
        elif X != 2:
            print("2")
        elif X != 3:
            print("3")
        elif X != 4 and X != 5:
            print("5")
        else:
            print("7")
resolve()

def resolve():
    X = int(input())
    ans = X
    while True:
        count = 0
        for i in range(2, X+1):
            if X%i == 0:
                count += 1
        if count == 0:
            print(ans)
            exit()
        else:
            ans += 1
resolve()

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

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

while True:
    c = 0
    for i in range(2, x+1):
        if x % i == 0:
            c += 1
    if cnt == 1:
        print(x)
        exit()
    else:
        x += 1


ans = int(input())

ok = 1

while ok:
    for i in range(2,ans+1):
        if ans % i == 0:
            ok = 0
    if ok == 0:
        print(ans)
    else:
        ans+=1


x = int(input())

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


Verdicts: Runtime Error

Wrong Answer

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

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

# lists = []

#     count = 0
#     for j in range(2, i+1):

#             count += 1
#     if count == 1:
#         lists.append(i)
# print(lists)
#
# max_lists = []


#         max_lists.append(i)
#
# print(max_lists)
# print(min(max_lists))




def get_prime_number(number):
    prime_list = []

    search_list = list(range(2, number + 1))

    while True:
        if search_list[0] > math.sqrt(number):
            prime_list.extend(search_list)
            break

        else:
            head_num = search_list[0]
            prime_list.append(head_num)

            search_list.pop(0)
            search_list = [num for num in search_list if num % head_num != 0]

    return prime_list


lists = get_prime_number(110000)
max_list = []
for i in lists:
    if i >= X:
        max_list.append(i)


import math
X = int(input())

# lists = []

#     count = 0
#     for j in range(2, i+1):

#             count += 1
#     if count == 1:
#         lists.append(i)
# print(lists)
#
# max_lists = []


#         max_lists.append(i)
#
# print(max_lists)
# print(min(max_lists))




def get_prime_number(number):
    prime_list = []

    search_list = list(range(2, number + 1))

    while True:
        if search_list[0] > math.sqrt(number):
            prime_list.extend(search_list)
            break

        else:
            head_num = search_list[0]
            prime_list.append(head_num)

            search_list.pop(0)
            search_list = [num for num in search_list if num % head_num != 0]

    return prime_list


lists = get_prime_number(110000)
max_list = []
for i in lists:
    if i >= X:
        max_list.append(i)

print(min(max_list))

Verdicts: Wrong Answer

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

Submission attempts (in order):
# coding: utf-8
import pkg
from itertools import combinations as comb
import numpy as np







	
	
	
	
	
def main():
	x = int(input())
	while not IsPrime(x):
		x += 1
	print(x)

def IsPrime(n):
	if n < 2:
		return False
	elif n == 2:
		return True
	elif n % 2 == 0:
		return False
	
	sqrtN = int(n**0.5)
	for i in range(3, sqrtN, 2):
		if n%i == 0:
			return False
	return True


def primes(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]]


if __name__ == '__main__':
	main()


def main():
	x = int(input())
	while not IsPrime(x):
		x += 1
	print(x)

def IsPrime(n):
	if n < 2:
		return False
	elif n == 2:
		return True
	elif n % 2 == 0:
		return False
	
	sqrtN = int(n**0.5)
	for i in range(3, sqrtN, 2):
		if n%i == 0:
			return False
	return True

if __name__ == '__main__':
	main()


Verdicts: Runtime Error

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

Submission attempts (in order):
import math
a=int(input())
for i in range(100000):
 for k in range(2, int(math.sqrt(i+a)) + 1):
        if (i+a) % k != 0:
         print(i+a)
         break
 else:
  continue
 break

import math
a=int(input())
for i in range(100000):
 for k in range(2, int(math.sqrt(i+a)) + 1):
        if (i+a) % k == 0:
         break
 else:
  print(i+a)
  break
 continue

Verdicts: Wrong Answer

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

Submission attempts (in order):
from itertools import permutations as perm
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


def main():
    
    N = input(int)
    primes = [2]
    for x in range(3, 100000 + 100, 2):
        for p in primes:
            if x % p == 0:
                break
        else:
            primes.append(x)
    for p in primes:
        if N <= p:
            print(p)
            break


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()


from itertools import permutations as perm
from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys
sys.setrecursionlimit(1000000)


args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v, yes="Yes", no="No", upper=False):
    if upper:
        print([yes.upper(), no.upper()][not v])
    else:
        print([yes, no][not v])


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


def main():
    
    N = input(int)
    for x in range(N, 100003 + 1):
        if is_prime(x):
            print(x)
            break


if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()


Verdicts: Time Limit Exceeded

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

Submission attempts (in order):
x = int(input())
y = int(x**0.5)

while True:
  x % y != 0:
    y -=1
    if y !=1:
      x +=1
      continue
    elif y ==1:
      break
print(x)

x = int(input())
y = int(x**0.5)
 
while x % y != 0:
  y -=1
  continue
  if y ==1:
    x +=1
    continue
  elif y !=1:
    break
print(x)

x = int(input())
y = int(x**0.5)
 
while x % y != 0:
  y -=1
  if x%y==0 and y==1:
    x +=1
    y = int(x**0.5)
  elif x%y==0 and y!=0:
    break
  else:
    continue
print(x)

x = int(input())
y = int(x**0.5)
 
while x % y != 0:
  y -=1
  continue
  if y ==1:
    x +=1
    y = int(x**0.5)
    continue
  elif x%y==0 and y !=1:
    break
print(x)

x = int(input())

flag ==0
while True:
  for i in range(2,x//2):
    if x%i==0:
      flag ==1
  if flag ==1:
    print(x)
    exit()
  else:
    x = x+1

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

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

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

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

Submission attempts (in order):
import math

x = int(input())

primes = []

for n in range(2, 10000000000, 2):
    f = True
    mp = math.ceil(math.sqrt(n))
    for p in primes:
        if p > mp:
            break
        if n % p == 0:
            f = False
            break
    if f:
        primes.append(n)
        if n >= x:
            print(n)
            exit(0)


import math

x = int(input())

primes = []

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

for n in range(3, 10000000000, 2):
    f = True
    mp = math.ceil(math.sqrt(n))
    for p in primes:
        if p > mp:
            break
        if n % p == 0:
            f = False
            break
    if f:
        primes.append(n)
        if n >= x:
            print(n)
            exit(0)


Verdicts: Time Limit Exceeded

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

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


x = int(input())

prime = [True] * (100004)
prime[2] = True

def e_prime(x):
	i = 2
	flag = False
	if(i==x):flag=True
	while True:
		if prime[i]:
			if(flag==True):
				return i
			else:
				for j in range(i**2,len(prime),i):
					prime[j]=False
		i+=1

print(e_prime(x))


import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
mo = 10**9+7

def primes(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 is_prime

def main():
	x = II()
	ps = primes(2*10**5)
	for i,n in enumerate(ps[x:],x):
		if(n):
			print(i)
			exit()

if __name__ == '__main__':
	main()

Verdicts: Runtime Error

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

Submission attempts (in order):
n = int(input())
x = 10**6
li = [True for i in range(x)]
li[0] = False
li[1] = False

for i in range(int(x**0.5)+1):
    if li[i]:
        m = 2
        while(i*m<=x):
            li[i*m] = False
            m += 1
#print(li)
for i in range(x):
    if i>=n and li[i]:
        print(i)
        break

n = int(input())
x = 10**6
li = [True for i in range(x+10)]
li[0] = False
li[1] = False

for i in range(int(x**0.5)+1):
    if li[i]:
        m = 2
        while(i*m<=x):
            li[i*m] = False
            m += 1
#print(li)
for i in range(x):
    if i>=n and li[i]:
        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):
        if x%i == 0
        break
    else:
        print(x)
        break
    x+=1

from sympy import isprime
n = int(input())
if isprime(n) == True:
    print(n)
else:
    print(sympy.nextprime(n))

x = int(input())
for y in range(x,2*x):
    for i in range(2, int(y**.5)+1):
        if y%i ==0:
            break
    else:
        print(y)
        break

Verdicts: Runtime Error

Runtime Error

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

Submission attempts (in order):
Source Code 

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

X=int(input())
for i in rage(2,X):
  if(X%i==0):
    X+=1
    break
  else :
  	print X


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

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


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


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

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

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

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

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

num = int(input())

for i in range(num,100004):
  if isPrime(i):
    print(i)
    break

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

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):
X = int(input())
result = False

while result == False:
  for i in range(2, -(-X//2)+1):
    if X % 2 == 0:
      result = False
      X += 1
      break
    else:
      result = True

print(X)

X = int(input())-1
result = False

while not result:
  result = True
  X += 1
  for i in range(2,X//2+1):
    if X % i == 0:
      result = False
      break
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())

if X == 2:
  print(2)
  exit()
  
hajime = X

if hajime % 2 == 0:
  hajime += 1
  
checkMax = math.ceil(math.sqrt(hajime))
for i in range(hajime, 1000000, 2):
  for j in range(2, checkMax + 1):
    if i % j == 0:
      print(i)
      exit()
 

import math
X = int(input())
for i in range(X, 1000000):
  goseisu = False
  for j in range(2, X):
    if i % j == 0:
      goseisu = True
      break
  if not goseisu:
    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
target = input()
def is_prime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n%i ==0:
            return False
    return True

not_found_flg = True
if target %2 == 0:
    target = target+1
result = 0
while not_found_flg:
    if (is_prime(target)):
        result = target
        break
    target = target+2

print(result)

import math
def is_prime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n%i ==0:
            return False
    return True
 
target = int(input())
 
not_found_flg = True
if target == 2:
    print("2")
else:
    if target %2 == 0:
        target = target+1
    result = 0

    while not_found_flg:
        if (is_prime(target)):
            result = target
            break
        target = target+2
 
    print(result)

Verdicts: Runtime Error

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

Submission attempts (in order):
import math

x = int(input())

tmp = int(math.sqrt(x))

if x == 2:
    print(2)

elif x % 2 == 0:
    x += 1

else:
    while True:
        count = 0
        for i in range(3, tmp, 2):
            if x % i == 0:
                x += 2
                count = 1
                break

        if count == 0:
            print(x)
            break


import math

x = int(input())

tmp = int(math.sqrt(x))

if x == 2:
    print(2)

elif x % 2 == 0:
    x += 1
    while True:
        count = 0
        for i in range(3, tmp, 2):
            if x % i == 0:
                x += 2
                count = 1
                break

        if count == 0:
            print(x)
            break

else:
    while True:
        count = 0
        for i in range(3, tmp, 2):
            if x % i == 0:
                x += 2
                count = 1
                break

        if count == 0:
            print(x)
            break


Verdicts: Wrong Answer

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:
      continue
  else:
    print(ans)
  ans += 1

import math

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

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

import math

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

Verdicts: Time Limit Exceeded

Time Limit Exceeded

Wrong Answer

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

Submission attempts (in order):
if (N <= 1):
  print(2) 
int prime = N; 
bool found = false; 
while (!found):
  prime++ 
  if (isPrime(prime)):
    found = true; 
print(prime)

num = int(input())

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

Verdicts: Runtime Error

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

Submission attempts (in order):
def check_prime(m):
  prime_flag = 1
  counter = 1
  while counter **2 <= m:
    if not m%counter:
      prime_flag = 0
      break
  return prima_flag


n = int(input())

for i in range(n, 10**6):
  if check_prime(i):
    print(i)
    break

def check_prime(m):
  prime_flag = 1
  counter = 2
  while counter **2 <= m:
    if not m%counter:
      prime_flag = 0
      break
    counter += 1
  return prime_flag


n = int(input())

for i in range(n, 10**6):
  if check_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):
X=int(input())

pn=[2];
for L in range(X,10**5):
    chk=True
    for L2 in pn:
        if L%L2 == 0:chk=False
    if chk==True:pn.append(L)
print(min(pn))

X=int(input())

import math

def isPrime(num):
    
    if num < 2: return False
    
    elif num == 2: return True
    
    elif num % 2 == 0: return False

    
    
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False

    
    return True

pn=[]
for i in range(X, 10**5+4):
    print(i)
    if isPrime(i):
        pn.append(i)
print(min(pn))



X=int(input())

import math

def isPrime(num):
    
    if num < 2: return False
    
    elif num == 2: return True
    
    elif num % 2 == 0: return False

    
    
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False

    
    return True

pn=[]
for i in range(X, 10**5+4):
    if isPrime(i):
        pn.append(i)
print(min(pn))



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

print(X)

X = int(input())

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

print(X)

Verdicts: Wrong Answer

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

Submission attempts (in order):
from bisect import bisect_left

def get_prime_list(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]]


X = int(input())
primes = get_prime_list(100100)
print(bisect_left(primes, X))

from bisect import bisect_left

def get_prime_list(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]]


X = int(input())
primes = get_prime_list(100100)
print(primes[bisect_left(primes, X)])

Verdicts: Wrong Answer

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

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

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

for i in range(X,10**5+4):
  if is_prime(i):
    print(i)
    exit()

# coding: utf-8
 
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 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
 
X = int(input())
 
for i in range(X,10**5+4):
  if is_prime2(i):
    print(i)
    exit()

Verdicts: Runtime Error

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

Submission attempts (in order):
def is_prime(x):
  if x <= 1:
    return False
  max_judge = sqrt(x)
  count = 2
  while(count < max_judge):
    if x % count == 0:
      return True
  return False

x = int(input())

judge_prime = False
while(!judge_prime):
  judge_prime = is_prime(x)
  
return x

import math

def is_prime(x):
  if x <= 1:
    return False
  max_judge = math.sqrt(x)
  count = 2
  while(count < max_judge):
    if x % count == 0:
      return False
    count+=1
  return True
 
x = int(input())
 
judge_prime = False

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


import math
t=0
X=int(input())
while True:
  if X==2:
    break
  t=0
  for i in range(2,math.ceil((X)**(1/2))+1):
    if X%i==0:
      break
    else:
      t+=1
  if t==math.ceil((X)**(1/2))-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):
# import math
import fractions

n = int(input())


def prime(n):
    if n == 1:
        n += 1
    while True:
        flag = 0
        for k in range(2, int(fractions.sqrt(n)) + 1):
            if n % k == 0:
                flag = 1
                break
        if flag == 0:
            return n
        n += 1


ans = prime(n)
print(ans)


n = int(input())


def prime(n):
    if n == 1:
        n += 1
    while True:
        flag = 0
        for k in range(2, int(n**0.5) + 1):
            if n % k == 0:
                flag = 1
                break
        if flag == 0:
            return n
        n += 1


ans = prime(n)
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())

flg = 1
ans = 0
print(10**5)
for i in range(X, 10**100):
    flg = 1
    for j in range(2, i):
        if i % j == 0:
            flg = 0
            break
    if flg == 1:
        ans = i
        break

print(ans)


X = int(input())

flg = 1
ans = 0
for i in range(X, 10**100):
    flg = 1
    for j in range(2, i):
        if i % j == 0:
            flg = 0
            break
    if flg == 1:
        ans = i
        break

print(ans)

Verdicts: Wrong Answer

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

Submission attempts (in order):
def prime(n):
    limit = math.floor(math.sqrt(n))
    for i in range(2,limit+1):
        if n % i == 0:
            return prime(n+1)
    return n

X = int(input())

print(prime(X))


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

X = int(input())

print(prime(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 is_prime(n):
    if n <= 1:
        return False   
    else:
        for i in range(2, n):
            if n%i==0:
                return False
        return True

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


X = int(input())

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

while is_prime(X)==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):
X=int(input())
ps=[]
x=2
while x=<X:
  f=True
  for p in ps:
    if x%p==0:
      f=False
      break
  if f:ps.append(x)
  x+=1
print(x)

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

X=int(input())
p=X
while is_prime(p) != False:p+=1
print(p)



Verdicts: Runtime Error

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

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

import math

def get_primenumber(number):
    prime_list = []
    
    search_list = list(range(2,number+1))
    while True:
      
      if search_list[0] > math.sqrt(number):
        
        prime_list.extend(search_list)
        break
      else:
        
        head_num = search_list[0]
        prime_list.append(head_num)
        
        search_list.pop(0)
        
        search_list = [num for num in search_list if num % head_num != 0]
    return prime_list
  
  num_list = get_primenumber(10**5+1)
  
  import sys

for i in range(len(num_list)):
    if X <= num_list[i]:
        print(num_list[i])
        sys.exit()

X = int(input())

import math
import sys

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

while True:
    if is_prime(X) == True:
        print(X)
        sys.exit()
    X+=1

Verdicts: Runtime Error

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

Submission attempts (in order):


import math
x_sq = math.sqrt(x)
x_sq_it = int(x_sq)

pnlist = [2]

countn = 0
for i in range(3,x_sq_it+1):
    for j in range(len(pnlist)):
        if i % pnlist[j] == 0:
            break
        else:
            countn += 1
    if countn == len(pnlist):
        pnlist.append(i)
        countn = 0
# print(pnlist)

countn = 0
for i in range(x,10**5):
    for j in range(len(pnlist)):
        if i % pnlist[j] == 0:
            break
        else:
            countn += 1
    if countn == len(pnlist):
        print(i)
        exit()
    else:
        countn = 0

x = int(input())
while any(x % i == 0 for i in range(2,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())
p=x**0.5
while any(x%i==0 for i in range(2,x//1+1)):
  x+=1
else:
  print(x)

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

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

Verdicts: Time Limit Exceeded

Runtime Error

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

Submission attempts (in order):
from sympy import sieve

X=int(input())

PL=[i for i in sieve.primerange(1, 10**5+1)]

PL.append(X)
PL.sorted()

ID=PL.index(X)

print(ID+1)

import math
 
def is_prime(n):
    for i in range(2, int(math.sqrt(n))+1):
        if n % i == 0:
            return False
    return True
 
def main():
    X = int(input())
    while True:
        result = is_prime(X)
        if result:
            print(X)
            exit()
        X +=1
 
if __name__ == '__main__':
    main()


Verdicts: Runtime Error

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

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

while True:
    tmp = n
    if tmp % 2 != 0 and tmp % 3 != 0 and tmp % 5 != 0 and tmp % 7 != 0:
        print(tmp)
        break
    else:
        tmp += 1

n = int(input())

while True:
    tmp = n
    if tmp % 2 != 0 and tmp % 3 != 0 and tmp % 5 != 0 and tmp % 7 != 0:
        print(tmp)
        break

n = int(input())
tmp = n

def is_prime(x):
    if (x==0 or x==1):
        return False
    for n in range(2,x-1):
        if (x % n) == 0:
            return False
    else:
        return True
    
while True:
    if is_prime(tmp):
        print(tmp)
        break
    else:
        tmp += 1

Verdicts: Wrong Answer

Wrong Answer

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

Submission attempts (in order):
from sympy import nextprime
from sympy import isprime

X = int(input())

if isprime(X) == True:
	print(nextprime(X))
else:
	print(X)


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

X = n

for i in range(n,10**6):
	if is_prime(i):
		break
		
print(i)

Verdicts: Runtime Error

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

Submission attempts (in order):
import java.util.Scanner;

public class AtCoderTest {
    static boolean is_prime(int n)
    {

        if (n <= 1) return false;
        if (n <= 3) return true;


        if (n % 2 == 0 || n % 3 == 0) return false;

        for (int i = 5; i * i <= n; i = i + 6)
            if (n % i == 0 || n % (i + 2) == 0)
                return false;

        return true;
    }
    static int nextPrime(int N)
    {
        if (N <= 1 || N == 2)
            return 2;

        int prime = N;
        boolean found = false;

        while (!found)
        {
            prime++;

            if (is_prime(prime))
                found = true;
        }

        return prime;
    }

    public static void main (String[] args)
    {
        Scanner sc = new Scanner(System.in);
        int N = sc.nextInt();
        if (is_prime(N)){
            System.out.println(N);
        }
        else{
                System.out.println(nextPrime(N));
        }
    }
}

def check(num):
    if num > 1:
        for i in range(2, num):
            if (num % i) == 0:
                return False
                break
        else:
            return True
    else:
        return False


a = int(input())

for i in range(a, 100500):
    if check(i):
        print(i)
        break

Verdicts: Runtime Error

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

Submission attempts (in order):
import math
x=int(input())
primemode = True
while primemode:
  sos = True
  for n in range(math.floor(math.sqrt(x))):
    if n+1 != 1:
      if x\(n+1) == 0:
        sos = False
  if sos:
    primemode = False
  x = x+1
print(x)

import math
x=int(input())
primemode = True
while primemode:
  sos = True
  for n in range(math.floor(math.sqrt(x))):
    if n+1 != 1:
      if x%(n+1) == 0:
        sos = False
  if sos:
    primemode = False
  else:
    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())
prime = [2]
for i in range(3, 100004):
  for p in prime:
    is_prime = True
    if i % p == 0:
      is_prime = False
      break
  if is_prime: prime.append(i)

print(min([i for i in prime if i >= X]))

X = int(input())

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

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

Verdicts: Time Limit Exceeded

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

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

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

x = int(input())
is_prime = False

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

Verdicts: Wrong Answer

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

Submission attempts (in order):
N = int(input())
x = 0
while x == 0:
    num = 2
    while N % 2 != 0:
        num += 1
    if num == N:
        x = 1
    else:
        N += 1
print(N)

N = int(input())
x = True
while x:
    num = 2
    while N % num != 0:
        num += 1
    if num == N:
        x = False
    else:
        N += 1
print(N)

Verdicts: Time Limit Exceeded

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:
            break
    else:
        print(x)
        exit()
    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)
        exit()
    x += 1

Verdicts: Runtime Error

Accepted