Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

while flag == 0:
    rootX = int(math.sqrt(X))
    for i in range(2, rootX+1):
        if X%i == 0:
            if X%2 == 0:
                X += 1
                break
            else:
                X += 2
                break
        elif i == rootX:
            flag = 1
            break
        else:
            continue

print(X)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

if X == 2 or X == 3:
    flag = 1

while flag == 0:
    rootX = int(math.sqrt(X))
    for i in range(2, rootX+1):
        if X%i == 0:
            if X%2 == 0:
                X += 1
                break
            else:
                X += 2
                break
        elif i == rootX:
            flag = 1
            break
        else:
            continue

print(X)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

while flag == 0:
    for i in range(2, int(math.sqrt(X))+1):
        if X%i == 0:
            if X%2 == 0:
                X += 1
                break
            else:
                X += 2
                break
        elif i == int(math.sqrt(X)):
            flag = 1
            break
        else:
            continue

print(X)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

if X == 2 or X == 3:
    flag = 1

while flag == 0:
    rootX = int(math.sqrt(X))
    for i in range(2, rootX+1):
        if X%i == 0:
            if X%2 == 0:
                X += 1
                break
            else:
                X += 2
                break
        elif i == rootX:
            flag = 1
            break
        else:
            continue

print(X)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

while flag == 0:
    for i in range(2, int(math.sqrt(X))+1):
        if X%i == 0:
            if X%2 == 0:
                X += 1
                break
            else:
                X += 2
                break
        elif i == int(math.sqrt(X)):
            flag = 1
            break
        else:
            continue

print(X)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

if X == 2 or X == 3:
    flag = 1

while flag == 0:
    rootX = int(math.sqrt(X))
    for i in range(2, rootX+1):
        if X%i == 0:
            if X%2 == 0:
                X += 1
                break
            else:
                X += 2
                break
        elif i == rootX:
            flag = 1
            break
        else:
            continue

print(X)

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

while flag == 0:
    for i in range(2, int(math.sqrt(X))+1):
        if X%i == 0:
            X += 1
            break
        elif i == int(math.sqrt(X)):
            flag = 1
            break
        else:
            continue

print(X)

Fixed submission:
# -*- coding: utf-8 -*-
"""
Created on Wed Mar  4 19:06:03 2020

@author: Kanaru Sato
"""
import math

X = int(input())

target = X
flag = 0

if X == 2 or X == 3:
    flag = 1

while flag == 0:
    rootX = int(math.sqrt(X))
    for i in range(2, rootX+1):
        if X%i == 0:
            if X%2 == 0:
                X += 1
                break
            else:
                X += 2
                break
        elif i == rootX:
            flag = 1
            break
        else:
            continue

print(X)