Problem:


Score : 200 points

Problem Statement

You are given a positive integer X.
Find the largest perfect power that is at most X.
Here, a perfect power is an integer that can be represented as b^p, where b is an integer not less than 1 and p is an integer not less than 2.

Constraints

1 ≤ X ≤ 1000

X is an integer.

Input

Input is given from Standard Input in the following format:

X

Output

Print the largest perfect power that is at most X.

Sample Input 1

10

Sample Output 1

9

There are four perfect powers that are at most 10: 1, 4, 8 and 9.
We should print the largest among them, 9.

Sample Input 2

1

Sample Output 2

1

Sample Input 3

999

Sample Output 3

961



Sample input:
10


Sample output:
9

Submission status: Wrong Answer

Solution code:
X = int(input())

X_half = X // 2
max_ans = 1
tmp_max = 0

for i in range(1,X_half+1):
    for j in range(2,X_half+1):
        tmp = i ** j
        if tmp<=X:
            tmp_max = tmp
            break
    max_ans = max(max_ans, tmp_max)

print(max_ans)

Submission status: Wrong Answer

Solution code:
def main():
    X = int(input())
    ma = 0
    for b in range(1, X+1):
        for p in range(2, X+1):
            if b**p > X:
                break
            ma = max(ma, b**p)
    print(ma)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
#B - Exponential
X = int(input())
for i in range(X,0,-1):
    X_1 = i**0.5
    if X_1.is_integer():
        print(i)
        exit()
    else:
        pass

Submission status: Wrong Answer

Solution code:
import bisect
X = int(input())

cand = [1]
for x in range(2, 34):
    while x <= 1000:
        x *= x
        cand.append(x)

cand = list(set(cand))
cand.sort()
i = bisect.bisect_right(cand, X)
print(cand[i-1])

Submission status: Wrong Answer

Solution code:
import math
X=int(input())
ans=0
for i in range(1,X//2):
	for j in range(2,11):
		tmp=i**j
		if tmp<=X:
			ans=max(ans,tmp)
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
x = int(input())

ans = 1
for i in range(x):
    for j in range(int(pow(x, 0.5)) + 1):
        for k in range(int(pow(x, 0.5)) + 1):
            if i == pow(j, k) and ans < i:
                ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())


def prime_factorization(n):  # 素因数分解
    res = []
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            cnt = 0
            while n % i == 0:
                cnt += 1
                n //= i
            res.append((i, cnt))
    if n > 1:
        res.append((n, 1))
    return res


ans = 1
for x in range(X, 0, -1):
    pf = prime_factorization(x)
    if len(pf) == 1 and 1 not in pf[0]:
        ans = x
        break
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 1
for b in range(1, 1001):
    for p in range(2, 11):
        now = b ** p
        if now <= x:
            ans = now
print(ans)

Submission status: Wrong Answer

Solution code:
X=int(input())

ans=0
for i in range(1,X):
    if i*i<=X: ans=i*i
    else: break

print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())
print(int((X ** 0.5)) ** 2)

Submission status: Wrong Answer

Solution code:
N = int(input())
result = 0
for i in range(1,int(N**0.5)+1):
  result = i
print(result ** 2)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#----------
X = int(input().strip())
#----------
candidate=set()
max_num = int( 1000**(1/2) )
for i in range( 1, max_num + 1 ):
    for j in range( 1, max_num + 1 ):
        calc = i**j
        if calc <= 1000:
            candidate.add(i**j)

ans=0
for i in candidate:
  if i <= X and ans < i:
    ans = i

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#----------
X = int(input().strip())
#----------
candidate=set()
max_num = int( 1000**(1/2) )
for i in range( max_num + 1 ):
    for j in range( max_num + 1 ):
        calc = i**j
        if calc <= 1000:
            candidate.add(i**j)

ans=0
for i in candidate:
  if i <= X and ans < i:
    ans = i

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#----------
X = int(input().strip())
#----------
candidate=[]
for i in range( int(1000**(1/2) + 1) ):
    candidate += [i**2]

ans=0
for i in candidate:
  if i <= X and ans < i:
    ans = i

print(ans)

Submission status: Wrong Answer

Solution code:
X=int(input())

X_=int(X**0.5)+1

ans=0
for i in range(2,X+1):
    for j in range(2,X_):
        bi=i
        while True:
            if bi%j!=0:
                break
            bi//=j
            if bi==1:
                ans=i

print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())
res = 0
for b in range(1, 33):
  for p in range(2, 10):
    res = max(res, b ** p)
print(res)

Submission status: Wrong Answer

Solution code:
import math


x = int(input())
ans = 1
for i in range(1, int(math.sqrt(x) + 1)):
    if i ** 2 <= x:
        ans = i ** 2
    else:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
import math


x = int(input())
ans = 1
for i in range(1, int(math.sqrt(x) + 1)):
    if i ** 2 < x:
        ans = i ** 2
    else:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
y = 2
ans = 2
ANS = 0
for i in range(1001):
    num = int(x**(1/y))
    ans = int(num**(y))
    y += 1
    if ANS < ans:
        ANS = ans
print(ANS)

Submission status: Wrong Answer

Solution code:
x = int(input())
import math
h = int(math.sqrt(x))
print(h**2)

Submission status: Wrong Answer

Solution code:
x = int(input())
 
ans=1
for i in range(1,x):
    for j in range(2,x):
        if i**j<=x:
            ans=i**j
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
 
ans=0
for i in range(1,x):
    for j in range(2,x):
        if i**j<=x:
            ans=i**j
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
x=int(input())
i=0
while x>=i**2:
    i+=1
print((i-1)**2)

Submission status: Wrong Answer

Solution code:
import math
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    x=INT()
    flg=0
    for i in range(x,0,-1):
        for j in range(2,10):
            rooti=i**(1/j)
            #print(rooti,i)
            if rooti.is_integer()==True:
                flg=1
        if flg==1:
            ct=i
            break
    print(ct)
            
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

Solution code:
X = int(input())
M = 1
for i in range(1, X):
    for p in range(2, 10):
        if M < i ** p <= X:
            M = i ** p
        else:
            break

print(M)

Submission status: Wrong Answer

Solution code:
X = int(input())
M = 1
for i in range(1, X):
    for p in range(2, 10):
        if M < i ** p < X:
            M = i ** p
        else:
            break

print(M)

Submission status: Wrong Answer

Solution code:
X = int(input())
M = 0
for i in range(1, X):
    for p in range(2, 10):
        if M < i ** p < X:
            M = i ** p
        else:
            break

print(M)

Submission status: Wrong Answer

Solution code:
X = int(input())
answer = 1
def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n /= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table

for n in range(1, X+1):
    # print(n, prime_decomposition(n))

    if len(set(prime_decomposition(n))) == 1 and len(prime_decomposition(n)) >= 2:
        answer = n
        # print(prime_decomposition(n))
print(answer)

Submission status: Wrong Answer

Solution code:
X = int(input())
answer = 1
def prime_decomposition(n):
    i = 2
    table = []
    while i * i <= n:
        while n % i == 0:
            n /= i
            table.append(i)
        i += 1
    if n > 1:
        table.append(n)
    return table

for n in range(1, X+1):
    if len(set(prime_decomposition(n))) == 1 and prime_decomposition(n)[0] != n:
        answer = n
        # print(n)
        # print(n)
        # print(set(prime_decomposition(n)))
# print(set(prime_decomposition(X)))
print(answer)

Submission status: Wrong Answer

Solution code:
x = int(input())
print(max(i ** j for i in range(1, 34) for j in range(1, 11) if i ** j <= x))

Submission status: Wrong Answer

Solution code:
x = int(input())
 
pre = 0
arr = []
for b in range(331,):
    print(b)
    for p in range(2,33):
        if b ** p <= x:
            arr.append(b**p)
 
print(max(arr))

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 0
for i in range(1,x+1):
    for j in range(2,x+1):
        if i**(1/j) % 1 == 0:
            ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 0
for i in range(1,x+1):
    for j in range(2,int(i**0.5)+2):
        if i**(1/j) % 1 == 0:
            ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
X=int(input())
for i in range(X+10):
    if i**2==X:
        print(X)
        exit()
    elif i**2>X:
        print((i-1)**2)
        exit()

Submission status: Wrong Answer

Solution code:
X = int(input())
ans = 1
for m in range(1,32):
    if m*m <= X:
        ans = m*m
print(ans)

Submission status: Wrong Answer

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


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


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]]

def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


def modinv(a, mod):
    return modpow(a, mod - 2, mod)


def cnk(a, b):
    MOD = 10**9+7
    ret = 1
    for i in range(b):
        ret *= (a-i)
        ret %= MOD
        ret = ret * modinv(i+1, MOD) % MOD
    return ret




def main():
    x = int(input())
    ans = x
    l = []
    for b in range(1, 1001):
        for p in range(2,10):
            v = b ** p
            if v > x:
                break

            if x > v:
                l.append(v)
    l.sort()
    if len(l) != 0:
        print(l[-1])
    else:
        print(1)



            


    




    


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n =(int)(input())
ans=0
for i in range(n):
  for j in range(n):
    if i**j <= n:
      ans=max(ans,i**j)
    else:
      break
print(ans)

Submission status: Wrong Answer

Solution code:
n =(int)(input())
ans=0
for i in range(n):
  for j in range(n):
    if i**j <= n:
      ans=i**j
    else:
      break
print(ans)

Submission status: Wrong Answer

Solution code:
n =(int)(input())
ans=0
for i in range(n):
  for j in range(n):
    if i**j <= n:
      ans=i**j
print(ans)

Submission status: Wrong Answer

Solution code:
n =(int)(input())
ans=0
for i in range(n):
  if i*i <= n:
    ans =i
print(ans)

Submission status: Wrong Answer

Solution code:
X=int(input())
ans=0
for i in range (40):
	if i*i<=X:
		ans=max(ans,i*i)

print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
l = [] 

for i in range(100):
    for j in range(10):
        if i**j <= a:
            l.append(i**j)
print(max(l))

Submission status: Wrong Answer

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


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


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]]

def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


def modinv(a, mod):
    return modpow(a, mod - 2, mod)


def cnk(a, b):
    MOD = 10**9+7
    ret = 1
    for i in range(b):
        ret *= (a-i)
        ret %= MOD
        ret = ret * modinv(i+1, MOD) % MOD
    return ret




def main():
    x = int(input())
    v = 1
    for i in range(1,10000):
        if x <= i*i:
            print((i-1)*(i-1))
            exit()
        


            


    




    


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())

ans = 0
for b in range(1, 1001):
    for p in range(2, 1001):
        if b ** p > x:
            break
        ans = b ** p
        
print(ans)

Submission status: Wrong Answer

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


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


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]]

def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


def modinv(a, mod):
    return modpow(a, mod - 2, mod)


def cnk(a, b):
    MOD = 10**9+7
    ret = 1
    for i in range(b):
        ret *= (a-i)
        ret %= MOD
        ret = ret * modinv(i+1, MOD) % MOD
    return ret




def main():
    x = int(input())
    v = 1
    for i in range(1,10000):
        if x < i*i:
            print((i-1)*(i-1))
            exit()
        


            


    




    


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from fractions import gcd
# from datetime import date, timedelta
# from heapq import *
import heapq
import math
from collections import defaultdict, Counter, deque
from bisect import *
import itertools
import fractions
import sys
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7
# input = sys.stdin.readline


def lcm(a, b):
    return a * b / fractions.gcd(a, b)


def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    # divisors.sort()
    return divisors


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


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


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]]

def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res


def modinv(a, mod):
    return modpow(a, mod - 2, mod)


def cnk(a, b):
    MOD = 10**9+7
    ret = 1
    for i in range(b):
        ret *= (a-i)
        ret %= MOD
        ret = ret * modinv(i+1, MOD) % MOD
    return ret




def main():
    x = int(input())
    v = 1
    for i in range(1,100):
        if x < i*i:
            print((i-1)*(i-1))
            exit()
        


            


    




    


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))

x = ni()
ans = 0
for i in range(100):
    p = i**2
    if p <= x:
        ans = p
    else:
        print(ans)
        break

Submission status: Wrong Answer

Solution code:
X = int(input())
m = 1
while (m+1)**2 <= X:
    m += 1
print(m*m)

Submission status: Wrong Answer

Solution code:
x=int(input())
ans=1
for i in range(2,int(x**0.5)+1):
    p=1
    while i*p<x:
        p*=i
    ans=max(p,ans)
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
lis = [i*i for i in range(1,31+1)]
lis.sort(reverse=True)
for i in range(len(lis)):
  if lis[i]<= x: 
    print(lis[i])
    break

Submission status: Wrong Answer

Solution code:
X=int(input())
import math
ans=[math.pow(math.floor(math.pow(X,1/i)),i) if math.pow(math.floor(math.pow(X,1/i)),i)<=X else 0 for i in range(2,10)]
print(int(max(ans)))

Submission status: Wrong Answer

Solution code:
X=int(input())
import math
ans=[math.floor(math.pow(X,1/i))**i for i in range(2,9)]
print(max(ans))

Submission status: Wrong Answer

Solution code:
X=int(input())
import math
print(math.floor(math.pow(X,0.5))**2)

Submission status: Wrong Answer

Solution code:
X=int(input())
import math
print(math.floor(X**0.5)**2)

Submission status: Wrong Answer

Solution code:
X = int(input())
l = []
if X < 4:
  print(1)
else:
  for i in range(2, int(X ** 0.5) + 1):
    j = 2
    while i ** j <= X:
      j += 1
    l.append(i ** j)
  l.sort()
  print(l[-1])

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

output = 1
for i in range(2,X):
    for j in range(2, X):
        if i ** j < X:
            output = i ** j
            break
            
print(output)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

output = 1
for i in range(2,X):
    for j in range(2, X):
        if i ** j < X:
            output = i ** j
            
print(output)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

output = 1
for i in range(X, 0, -1):
    if math.sqrt(i) == int(math.sqrt(i)):
        output = i
        break

print(output)

Submission status: Wrong Answer

Solution code:
import math
X = int(input())

output = 0
for i in range(X, 0, -1):
    if math.sqrt(i) == int(math.sqrt(i)):
        output = i
        break

print(output)

Submission status: Wrong Answer

Solution code:
x=int(input())
ans=1
for i in range(2,int(x**0.5)+1):
    while i*i<=x:
        i*=i
    ans=max(i,ans)
print(ans)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import math


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

    print(int(math.sqrt(X))**2)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 1
for i in range(100):
    for j in range(100):
        if x < i**j: break
        else: ans = max(ans, i**j)
print(ans)

Submission status: Wrong Answer

Solution code:
x=int(input())
li=[pow(i,2) for i in range(32) if pow(i,2)<=x]
print(li[-1])

Submission status: Wrong Answer

Solution code:
x=int(input())
cnt=0
a=[]
for i in range(1,11):
    for j in range(1,32):
        a.append(j**i)
a=[l for l in a if l <= x]
print(max(a))

Submission status: Wrong Answer

Solution code:
from math import log, sqrt

X = int(input())
max_num = 1
for i in range(2, int(sqrt(X)) + 1):
    max_num = max(max_num, i ** int(log(X, i)))

print(max_num)

Submission status: Wrong Answer

Solution code:
import collections
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
X=int(input())
for i in range(X):
  l=prime_factorize(X-i)
  c=collections.Counter(l)
  if len(c)==1 and l[0]!=X-i:
    print(X-i)
    exit()
print(1)

Submission status: Wrong Answer

Solution code:
import collections
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
X=int(input())
if X==1:
  print(1)
for i in range(X):
  l=prime_factorize(X-i)
  c=collections.Counter(l)
  if len(c)==1 and l[0]!=X-i:
    print(X-i)
    exit()

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
max_exp = -1
for i in range(1, X+1):
    tmp = math.sqrt(i)
    if tmp.is_integer() and i > max_exp:
        max_exp = max(max_exp, i)
    if i == 1000:
        max_exp = max(1000, max_exp)
print(int(max_exp))

Submission status: Wrong Answer

Solution code:
import math
X = int(input())
max_exp = -1
for i in range(1, X+1):
    tmp = math.sqrt(i)
    if tmp.is_integer():
        max_exp = max(max_exp, i)
print(int(max_exp))

Submission status: Wrong Answer

Solution code:
x = int(input())
print(int((x**(1/2)))**2)

Submission status: Wrong Answer

Solution code:
x = int(input())
lis = []
for i in range(1,100):
    for j in range(2,10):
        lis.append(i**j)
lis.sort()
print(lis)
for i in range(1001):
    if lis[i+1] == x:
        print(lis[i+1])
        break
    elif lis[i+1] > x:
        print(lis[i])
        break

Submission status: Wrong Answer

Solution code:
n=int(input())
if n==1:
  print(1)
  exit()
i,j=1,2
m=i**j
while(i**j<n):
  i=1
  while(True):
    f=(i+1)**j<=n
    if f==True:
      i+=1
    else:
      break
  m=max(m,i**j)
  j+=1
print(m)

Submission status: Wrong Answer

Solution code:
n=int(input())
i=1
while((i+1)**2<=n):
   i+=1
print(i**2)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(2, int(n**0.5+1)):
  tmp = i
  while tmp <= n//i:
    tmp *= i
  ans = max(ans, tmp)
print(ans)

Submission status: Wrong Answer

Solution code:
import math as math
x = int(input())

for i in range(x, 0, -1):
    if(math.sqrt(i) % 1 == 0):
        print(i)
        break

Submission status: Wrong Answer

Solution code:
import numpy as np
x = int(input())

for i in range(x, 1, -1):
    if(np.sqrt(i) % 1 == 0):
        print(i)
        break

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 1
for i in range(2, x+1):
    tmp = i
    flag = False
    while tmp * i < x:
        flag = True
        tmp *= i
    if flag:
        ans = max(ans, tmp)

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
list=[]
for i in range(32):
	for j in range(10):
		ans=i**j
		if ans<=n:
			list.append(ans)
print(max(list))

Submission status: Wrong Answer

Solution code:
import sys

n=int(input())
for i in range(32,0,-1):
	ans=i**2
	if ans<=n:
		print(ans)
		sys.exit()

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
l.append(1)
for i in range(2,40):
  b = i**2
  while b <= 1000:
    l.append(b)
    b*= i
l.sort()

for i in range(len(l)):
  if n < l[i]:
    print(l[i-1])
    exit()

Submission status: Wrong Answer

Solution code:
n = int(input())
l = []
l.append(1)
for i in range(2,40):
  b = i**2
  while b <= 1000:
    l.append(b)
    b*= i
l.sort()
for i in range(len(l)):
  if n > l[i]:
    print(l[i-1])
    exit()

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=int(0)
for i in range(n):
    if i*i<=n:
        ans=i*i

if n==1:
    print(1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
x=int(input())
ans=0
for i in range(1,x):
  for j in range(2,12):
    if i**j<=x:
      ans=max(ans,i**j)
    else:
      break
print(ans)

Submission status: Wrong Answer

Solution code:
x=int(input())
ans=0
for i in range(2,x):
  for j in range(1,12):
    if i**j<=x:
      ans=max(ans,i**j)
    else:
      break
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
for i in range(N):
	if(i*i > N):
		print((i-1)*(i-1))
		break

Submission status: Wrong Answer

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

X = int(readline())

ans = 1
while ans * ans <= X:
    ans += 1
print((ans - 1)**2)

Submission status: Wrong Answer

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import itertools
# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

X = int(readline())

ans = 1
while ans * ans <= X:
    ans += 1
print(ans - 1)

Submission status: Wrong Answer

Solution code:
X = int(input())

for x in range(X, 0, -1):
    if (x ** 0.5).is_integer():
        print(x)
        exit()

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 1

for i in range(2, int(x**(0.5))+1):
  j = 2
  while True:
    k = i**j
    if k > x:
      break
    else:
      ans = max(ans, i)
      j += 1
      
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 1

for i in range(2, int(x**(0.5))+2):
  j = 2
  while True:
    i = i**j
    if i > x:
      break
    else:
      ans = max(ans, i)
      j += 1
      
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 1

for i in range(2, int(x**(0.5))+1):
  j = 2
  while True:
    i = i**j
    if i > x:
      break
    else:
      ans = max(ans, i)
      j += 1
      
print(ans)

Submission status: Wrong Answer

Solution code:
X = int(input())

ans = 1

for i in range(1, X+1):
    for j in range(2, X+1):
        if i ** j > X:
            continue
        else:
            ans = i ** j
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
L = []
for i in range(1,32):
  for j in range(1,10):
    if X < i**j:
      if j != 2:
        L.append(i**(j-1))
        break
      break
    elif X == i**j:
      print(i**j)
      sys.exit(0) #平方数忘れ
print(max(L))

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
L = []
for i in range(1,32):
  for j in range(1,10):
    if X <= i**j:
      if j != 2:
        L.append(i**(j-1))
        break
      break
print(max(L))

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
L = []
for i in range(1,32):
  for j in range(1,10):
    if X <= i**j:
      L.append(i**(j-1))
      break
print(max(L))

Submission status: Wrong Answer

Solution code:
import sys
X = int(input())
L = []
for i in range(1,32):
  for j in range(2,10):
    if X <= i**j:
      L.append(i**(j-1))
      break
print(max(L))

Submission status: Wrong Answer

Solution code:
a=int(input())
print(int(a**.5)**2)

Submission status: Wrong Answer

Solution code:
x = int(input())

result = 0
for i in range(2,x+1):
  beki = 2
  while (i**beki) <= x:
    result = i**beki 
    beki+=1

if result == 0:
  print(1)
else:
  print(result)

Submission status: Wrong Answer

Solution code:
x = int(input())

for i in range(x,0,-1):
  if (i**(1/2)).is_integer() or (i**(1/3)).is_integer():
    print(i)
    break

Submission status: Wrong Answer

Solution code:
X = int(input())

x = 0

if X == 1:
  print(X)
  
else:
  for i in range(2,int(X ** 0.5) + 1):
    n = 1
    a = i
    while n < X :
      n *= a
    if n // a > x:
      x = (n // a)
  
  print(x)

Submission status: Wrong Answer

Solution code:
X = int(input())

x = 0

for i in range(2,int(X ** 0.5) + 1):
  n = 1
  a = i
  while n < X :
    n *= a
  if n // a > x:
    x = (n // a)

print(x)

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 0
for a in range(2,x):
  for b in range(2,x):
    if a**b <= x:
        ans = max(ans,a**b)
        #print(a,b)
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 0
for a in range(2,x):
  for b in range(2,x):
    if a**b <= x:
        ans = max(ans,a**b)
        print(a,b)
print(ans)

Submission status: Wrong Answer

Solution code:
x = int(input())
ans = 0
for a in range(1,x):
  for b in range(1,1000):
    if a**b <= x:
      ans = max(ans,a**b)
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
print(int(np.sqrt(int(input())))**2)

Submission status: Wrong Answer

Solution code:
X = int(input())

ans = []
for i in range(100):
    for j in range(100):
        if i**j > X:
            continue
        ans.append(i**j)
print(max(ans))

Submission status: Wrong Answer

Solution code:
# coding: utf-8
X=int(input())
A=[]
for i in range(1,X+1):
    for j in range(2,X+2):
        if i**j<=X:
            A.append(i**j)
            break
        else:
            break
A.sort()
#print(A)

print(A[len(A)-1])