Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
            break

    if q / p == p:
        return 1
    else:
        return q / p


z = []
a = 1

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))


Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))

Buggy python submission (verdict: Runtime Error):
x = int(input())


def func(p):
    q = 1
    while q <= x:
        q *= p
    return q / p


z = []
a = 2


if x = 1:
    print("1")
    exit()


while a <= x ** 0.5:
    z.append(func(a))
    a += 1

print(max(z))


Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))

Buggy python submission (verdict: Runtime Error):
x = int(input())


def func(p):
    q = 1
    while q <= x:
        q *= p
    return q / p


z = []
a = 2

if x = 1:
    print("1")
    exit()

else:
    while a <= x ** 0.5:
        z.append(func(a))
        a += 1

print(max(z))


Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())


def func(p):
    q = 1
    while q <= x:
        q *= p
    return q / p


z = []
a = 1
y = x ** 0.5

while a <= y:
    z.append(func(a))
    a += 1

print(max(z))


Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())


def func(p):
    q = 1
    while q <= x:
        q *= p
    return q / p


z = []
a = 1

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))


Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))

Buggy python submission (verdict: Runtime Error):
x = input(int, )


def func(p):
    q = 1
    while p ** q <= x:
        q += 1
    return p ** (q - 1)


ctn = []
a = 1

while a <= x:
    ctn.append(func(a))
    a += 1

print(max(ctn))


Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))

Buggy python submission (verdict: Runtime Error):
x = input(int, )


def func(p):
    q = 1
    while p ** q <= x:
        q += 1
    return p ** (q - 1)


ctn = []
a = 1

while a <= x ** (1/2):
    ctn.append(func(a))
    a += 1

print(max(ctn))


Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))

Buggy python submission (verdict: Runtime Error):
x = input(int, )

def func(p):
    q = 1
    while p ** q <= x:
        q += 1
    return p ** (q - 1)

l = []
a = 1

while a <= x ** (1/2):
    l.append(func(a))
    a += 1

print(l.sort([-1]))

Fixed submission:
x = int(input())

if x == 1:
    print("1")
    exit()


def func(p):
    q = p
    while q < x:
        q *= p
        if q == x:
            return q
    if q / p == p:
        return 1
    else:
        return q // p


z = []
a = 2

while a <= x:
    z.append(func(a))
    a += 1

print(max(z))