Buggy python submission (verdict: Runtime Error):
from math import sqrt

x = int(input())
sqrt_x = int(sqrt(x))
ans = 1

for b in range(sqrt_x):
    for p in range(sqrt_x-1):
        exp = (b+1)**(p+2)
    if exp<=x and ans<=exp:
        ans = exp
        
print(ans)

Fixed submission:
X = int(input())

score =0
half_x = round(X/2)

answer = 0

if X < 3:
    print(1)

elif X <= 8:
    print(2)

else:
    while 1 < half_x:
        half_x -= 1
        
        for p in range(2, 10):
            
            score = pow(half_x,p)
            if score > X:
                continue
        
            if answer < score:
                answer = score
                
    print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
from math import sqrt

x = int(input())
sqrt_x = int(x)

ans = 1
for b in range(sqrt_x):
    for p in range(sqrt_x-1):
  
        exp = (b+1)**(p+2)

        if exp<=x and ans<=exp:
            ans = exp

print(ans)

Fixed submission:
X = int(input())

score =0
half_x = round(X/2)

answer = 0

if X < 3:
    print(1)

elif X <= 8:
    print(2)

else:
    while 1 < half_x:
        half_x -= 1
        
        for p in range(2, 10):
            
            score = pow(half_x,p)
            if score > X:
                continue
        
            if answer < score:
                answer = score
                
    print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
from math import sqrt

x = int(input())
sqrt_x = int(x)

ans = 1

for b in range(sqrt_x):
  
  for p in range(sqrt_x-1):
  
    exp = (b+1)**(p+2)

    if exp<=x and ans<=exp:
      ans = exp

print(ans)

Fixed submission:
X = int(input())

score =0
half_x = round(X/2)

answer = 0

if X < 3:
    print(1)

elif X <= 8:
    print(2)

else:
    while 1 < half_x:
        half_x -= 1
        
        for p in range(2, 10):
            
            score = pow(half_x,p)
            if score > X:
                continue
        
            if answer < score:
                answer = score
                
    print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
from math import sqrt

x = int(input())
sqrt_x = int(x)

ans = 1

for b in range(sqrt_x):
  
  for p in range(sqrt_x-1):
  
    exp = (b+1)**(p+2)

    if exp<=x and ans<=exp:
      ans = exp

print(ans)

Fixed submission:
X = int(input())

score =0
half_x = round(X/2)

answer = 0

if X < 3:
    print(1)

elif X <= 8:
    print(2)

else:
    while 1 < half_x:
        half_x -= 1
        
        for p in range(2, 10):
            
            score = pow(half_x,p)
            if score > X:
                continue
        
            if answer < score:
                answer = score
                
    print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
from math import sqrt

x = int(input())
sqrt_x = int(x)

ans = 1

for b in range(1, sqrt_x):
  
  for p in range(2, sqrt_x+1):
  
    exp = (b)**(p)

    if exp<=x and ans<=exp:
      ans = exp

print(ans)

Fixed submission:
X = int(input())

score =0
half_x = round(X/2)

answer = 0

if X < 3:
    print(1)

elif X <= 8:
    print(2)

else:
    while 1 < half_x:
        half_x -= 1
        
        for p in range(2, 10):
            
            score = pow(half_x,p)
            if score > X:
                continue
        
            if answer < score:
                answer = score
                
    print(answer)