ZhenlongDai/ACPR huggingface dataset:
Problem: p03364
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
n = int(input())
a = [list(input().rstrip()) for i in range(n)]
ans = 0
for k in range(n):
    for i in range(n):
        for j in range(i+1,n):
            if a[(i+k)%n][j] != a[(j+k)%n][i]:
                break
        else:
            ans+=1
            continue
        break
print(ans)

Failing test case input:
4
aaab
ab``
a`aa
baaa

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
n = int(input())
a = [list(input().rstrip()) for i in range(n)]
ans = 0
for k in range(n):
    for i in range(n):
        for j in range(i+1,n):
            if a[(i+k)%n][j] != a[(j+k)%n][i]:
                break
        else:
            continue
        break
    else:
        ans += n
print(ans)

Problem: p03364
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
S = []
for i in range(N):
    S.append(input())

def check(A, B):
    for i in range(N):
        for j in range(i+1, N):
            if S[i][j] != S[j][i]:
                return 0
    return 1

cnt = 0
for i in range(N):
    cnt += check(0, i)
print(cnt * N)

Failing test case input:
2
bc
bb

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
S = []
for i in range(N):
    S.append(input())

def check(S, A, B):
    for i in range(N):
        for j in range(i+1, N):
            if S[i][j] != S[j][i]:
                return 0
    return 1

cnt = 0
for i in range(N):
    cnt += check(S[i:] + S[:i], 0, i)
print(cnt * N)

Problem: p03364
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
S = [''] * N
for i in range(N):
  S[i] = input()
cnt = 0
for a in range(N):
  for i in range(1 - a, N - a):
    _i = i % N
    for j in range(_i):
      if S[_i][j] != S[j][_i]:
        break
    else:
      continue
    break
  else:
    cnt += N
print(cnt)

Failing test case input:
2
cb
ab

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
S = [''] * N
for i in range(N):
  S[i] = input()
cnt = 0
for a in range(N):
  for i in range(N):
    _i = (i - a) % N
    for j in range(i):
      if S[_i][j] != S[(j - a) % N][i]:
        break
    else:
      continue
    break
  else:
    cnt += N
print(cnt)

Problem: p03364
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
s=[list(input()) for i in range(n)]
ans=0
for i in range(n):
  ct=0
  for j in range(n):
    for k in range(n):
      if s[(j+i)%n][k]==s[(k+1)%n][j]:
        ct+=1
  if ct==n**2:
    ans+=1
print(ans*n)

Failing test case input:
4
aaaa
aaaa
aaaa
baaa

Expected output:
4


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
s=[list(input()) for i in range(n)]
ans=0
for i in range(n):
  ct=0
  for j in range(n):
    for k in range(n):
      if s[(j+i)%n][k]!=s[(k+i)%n][j]:
        ct+=1
  if ct==0:
    ans+=1
print(ans*n)
Problem: p03364
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
s=[input() for _ in range(n)]
cnt=0
for j in range(n):
  f=s[0][j]
  for i in range(n):
    if f!=s[i][(i+j)%n]:break
  else:cnt+=1
if cnt==n:ans=n**2
elif cnt==n-1:ans=2
else:ans=0
print(ans)

Failing test case input:
4
aaaa
aaaa
aaaa
baaa

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
n=int(input())
s=[input() for _ in range(n)]
ans=0
for k in range(n):
  cnt=0
  for i in range(n): 
    l=(i+k)%n
    for j in range(n):
      cnt+=s[i][j]==s[(i+j-l)%n][l]
  if cnt==n**2:ans+=n
print(ans)

Problem: p03364
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = [list(input()) for i in range(n)]
s += s

def ok(array):
    for i in range(1,n):
        for j in range(i):
            if array[i][j] != array[j][i]:
                return False
    return True
ans = 0
for i in range(n-1):
    if ok(s[i:i+n]):
        ans += n
print(ans)


Failing test case input:
2
ab
ca

Expected output:
2

Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
s = [list(input()) for i in range(n)]
s += s

def ok(array):
    for i in range(1,n):
        for j in range(i):
            if array[i][j] != array[j][i]:
                return False
    return True
ans = 0
for i in range(n):
    if ok(s[i:i+n]):
        ans += n
print(ans)

Problem: p03364
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
I,R=input,range
n=int(I())
s=[I()for i in R(n)]
a=0
for i in R(n):
 if all(s[(i+j)%n][k]==s[(i+k)%n][j]for j in R(n)for k in R(i+1,n)):a+=n
print(a)

Failing test case input:
5
edcba
jihfg
onmlk
pqrst
uvwxy

Expected output:
0


Actual output:
5


Fixed submission (verdict: Accepted):
I,R=input,range
n=int(I())
s=[I()for i in R(n)]
a=0
for i in R(n):
 if all(s[(i+j)%n][k]==s[(i+k)%n][j]for j in R(n)for k in R(j+1,n)):a+=n
print(a)

Problem: p03364
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys
def input():
    return sys.stdin.readline()[:-1]
N=int(input())
S=[input() for i in range(N)]
a=0
for i in range(N):
    for j in range(N-1):
        for k in range(j+1,N):
            if S[(j+i)%N][k]!=S[k][(j+i)%N]:
                break
        else:
            continue
        break
    else:
        a+=1
print(a*N)

Failing test case input:
2
bc
ba

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
N=int(input())
S=[input() for i in range(N)]
a=0
for i in range(N):
    for j in range(N-1):
        for k in range(j+1,N):
            if S[(j+i)%N][k]!=S[(k+i)%N][j%N]:
                break
        else:
            continue
        break
    else:
        a+=1
print(a*N)
Problem: p03364
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
A = [input() for _ in range(n)]
AT = list(map(''.join,zip(*A)))
count = 0
for a in range(n):
    arr = A[a:][:] + A[:a][:]
    arrT = AT[a:][:] + AT[:a][:]
    for i in range(n):
        if arr[i][i+1:] != arrT[i][i+1:]:
            break
    else:
        count += n
print(count)

Failing test case input:
4
baaa
aaaa
aaaa
baaa

Expected output:
0


Actual output:
4


Fixed submission (verdict: Accepted):
n = int(input())
A = [input() for _ in range(n)]

count = 0
for a in range(n):
    arr = A[a:][:] + A[:a][:]
    arrT = list(map(''.join, zip(*arr)))
    for i in range(n):
        if arr[i][i+1:] != arrT[i][i+1:]:
            break
    else:
        count += n
print(count)

Problem: p03364
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
l=[]
for i in range(n):
    s=list(input())
    l.append(s+s)
ans=0
for i in range(n):
    f=0
    for h in range(n):
        for w in range(n):
            
            if l[h][w+i]!=l[h-w][h+i]:
                f+=1
    if f==0:
        ans+=1
print(ans*n)

Failing test case input:
2
cb
ac

Expected output:
2


Actual output:
0


Fixed submission (verdict: Accepted):
n=int(input())
l=[]
for i in range(n):
    s=list(input())
    l.append(s+s)
ans=0
for i in range(n):
    f=0
    for h in range(n):
        for w in range(n):
            
            if l[h][w+i]!=l[w][h+i]:
                f+=1
    if f==0:
        ans+=1
print(ans*n)

Problem: p03364
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = [input() for i in range(n)]

cnt = 0

for i in range(n):
    i_ = (n+i)%n
    for k in range(n):
        for l in range(n):
            if s[(i_+k)%n][l] != s[(i_+l)%n][k]:
                break
        else:
            continue
        break
    else:
        cnt += 1

print(cnt*2)

Failing test case input:
4
aaaa
aaaa
aaaa
aaaa

Expected output:
16

Actual output:
8


Fixed submission (verdict: Accepted):
n = int(input())
s = [input() for i in range(n)]

cnt = 0

def is_symmetry(s_):
    for k in range(n):
        for l in range(k+1, n):
            if s_[k][l] != s_[l][k]:
                return False
    return True

for i in range(n):
    i_ = (n+i)%n
    s_ = s[i_:] + s[:i_]
    if is_symmetry(s_):
        cnt += 1

print(cnt*n)

Problem: p03364
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
S=[input() for i in range(N)]
a=0
for i in range(N):
    for j in range(N-1):
        for k in range(j+1,N):
            if S[(j+i)%N][k]!=S[k][(j+1)%N]:
                break
        else:
            continue
        break
    else:
        a+=1
print(a*N)

Failing test case input:
2
bb
ac

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
N=int(input())
S=[input() for i in range(N)]
a=0
for i in range(N):
    for j in range(N-1):
        for k in range(j+1,N):
            if S[(j+i)%N][k]!=S[(k+i)%N][j%N]:
                break
        else:
            continue
        break
    else:
        a+=1
print(a*N)
Problem: p03364
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N = int(input())
S = [''] * N
for i in range(N):
  S[i] = input()
cnt = 0
for a in range(N):
  for i in range(1 - a, N - a):
    for j in range(i + a):
      if S[i % N][j % N] != S[j % N][i % N]:
        break
    else:
      continue
    break
  else:
    cnt += N
print(cnt)

Failing test case input:
2
bc
aa

Expected output:
0


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
S = [''] * N
for i in range(N):
  S[i] = input()
cnt = 0
for a in range(N):
  for i in range(N):
    _i = (i - a) % N
    for j in range(i):
      if S[_i][j] != S[(j - a) % N][i]:
        break
    else:
      continue
    break
  else:
    cnt += N
print(cnt)
Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=list(map(int, input().split()))

m=a[0]
n=a[1]

b=(1900*m+100*(n-m))*(2**m)
print(b)

Failing test case input:
000 2

Expected output:
14400


Actual output:
200


Fixed submission (verdict: Accepted):
a=list(map(int, input().split()))

n=a[0]
m=a[1]

b=(1900*m+(100*(n-m)))*(2**m)
print(b)

Problem: p03549
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N, M = list(map(int, input().split()))
print((M * 1900 + (N - M) * 100) * pow(2, 5))

Failing test case input:
000 2

Expected output:
14400


Actual output:
115200


Fixed submission (verdict: Accepted):
N, M = list(map(int, input().split()))
print((M * 1900 + (N - M) * 100) * pow(2, M))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
s = (1900*m + (n-m)*100)*n*2**m
print(s)

Failing test case input:
000 2

Expected output:
14400


Actual output:
0


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
s = (1900*m + (n-m)*100)*2**m
print(s)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
print(1900*m + 100*(n - m) * 2**m)

Failing test case input:
000 2

Expected output:
14400


Actual output:
3000


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
print((1900*m + 100*(n - m)) * 2**m)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())

print((1990*m + 100*(n-m))*(2**m) )

Failing test case input:
000 2

Expected output:
14400


Actual output:
15120


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())

print((1900*m + 100*(n-m))*(2**m) )

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(n, m):

    ans = ((n-m) * 100 + 1900 * m) * 2 ** m

    return ans

if __name__ == "__main__":
    n, m = [int(i) for i in input().split()]
    solve(n, m)

Failing test case input:
000 2

Expected output:
14400


Actual output:

Fixed submission (verdict: Accepted):
def solve(n, m):

    ans = ((n-m) * 100 + 1900 * m) * 2 ** m
    return ans

if __name__ == "__main__":
    n, m = [int(i) for i in input().split()]
    print(solve(n, m))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
print((1900 * M + 100 * (N-M)) / pow(1/2, M))

Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
print("{:.0f}".format((1900 * M + 100 * (N-M)) / pow(1/2, M)))
Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N,M = inpl()
T = (N-M)*100 + 1900*M
print(T)
k = 2**M
print(k*T)


Failing test case input:
000 2

Expected output:
14400


Actual output:
3600
14400


Fixed submission (verdict: Accepted):
from collections import defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

N,M = inpl()
T = (N-M)*100 + 1900*M
k = 2**M
print(k*T)

Problem: p03549
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N,M = map(int,input().split())
print(1900*M + 100*(N-M)*(2**M))

Failing test case input:
000 2

Expected output:
14400


Actual output:
3000


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())
a = 1900*M + 100*(N-M)
b = 2**M
print(a*b)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=list(map(int,input().split()))

ans=(1900*M+100*(N-M))*2^M
print(ans)

Failing test case input:
000 2

Expected output:
14400


Actual output:
7202


Fixed submission (verdict: Accepted):
N,M=list(map(int,input().split()))

ans=(1900*M+100*(N-M))*(2**M)
print(ans)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = list(map(int,input().split()))

x = ((M - M) * 100 + 1900 * M) *(2 ** M)
print(x)

Failing test case input:
000 2

Expected output:
14400


Actual output:
15200


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
x = ((N - M) * 100 + 1900 * M) *(2 ** M)
print(x)

Problem: p03549
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n, m = list(map(int, readline().split()))
    t1 = n - m
    t2 = m
    print((t1 * 100 + t2 * 1900) / (1 / 2) ** t2)


if __name__ == '__main__':
    solve()


Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n, m = list(map(int, readline().split()))
    t1 = n - m
    t2 = m
    print(int((t1 * 100 + t2 * 1900) / (1 / 2) ** t2))


if __name__ == '__main__':
    solve()

Problem: p03549
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, m = map(int, input().split())
x = 1900 * m - 100 * (n - m)
print(x * (2**m))

Failing test case input:
000 2

Expected output:
14400


Actual output:
16000


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
x = 1900 * m + 100 * (n - m)
print(x * (2**m))
Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
print(1900*2**M)


Failing test case input:
000 2

Expected output:
14400


Actual output:
7600


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
print((1900*M+100*(N-M))*(2**M))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N ,M=map(float,input().split())
print(int((1900*M+100*(N-M)*2**M)))


Failing test case input:
000 2

Expected output:
14400


Actual output:
3000


Fixed submission (verdict: Accepted):
N ,M=map(float,input().split())
print(int((1900*M+100*(N-M))*2**M))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = [int(x) for x in input().split()]
print((1900 * N + 100 * (N - M)) * 2 ** M)

Failing test case input:
000 2

Expected output:
14400


Actual output:
-800


Fixed submission (verdict: Accepted):
N, M = [int(x) for x in input().split()]
print((1900 * M + 100 * (N - M)) * 2 ** M)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())

print( 1900*m+100*(n-m)*2**m )


Failing test case input:
000 2

Expected output:
14400


Actual output:
3000


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())

print( (1900*m+100*(n-m))*2**m )

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = map(int,input().split())
print(1900*(2**m))

Failing test case input:
000 2

Expected output:
14400


Actual output:
7600


Fixed submission (verdict: Accepted):
n,m = map(int,input().split())
print((1900*m+100*(n-m))*(2**m))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
ans = pow(2, M) * (1900 * M + 100 * (N - M))

Failing test case input:
000 2

Expected output:
14400


Actual output:

Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
print(pow(2, M) * (1900 * M + 100 * (N - M)))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys

S = list(map(int,input().split()))

N=S[0]
M=S[1]

a=(N-M)*100+M*1900

print(a)
r=2**M
print(r)

result=a*r

print(result)

Failing test case input:
000 2

Expected output:
14400


Actual output:
3600
4
14400


Fixed submission (verdict: Accepted):
import sys

S = list(map(int,input().split()))

N=S[0]
M=S[1]

a=(N-M)*100+M*1900


r=2**M
result=a*r

print(result)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m = list(map(int, input().split()))

print(1900*(2**m))

Failing test case input:
000 2

Expected output:
14400


Actual output:
7600


Fixed submission (verdict: Accepted):
n,m = list(map(int, input().split()))

print((1900*m+100*(n-m))*(2**m))
Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())

p = 0.5 ** M
q = 1 - p
i = 0
sum = 0
while True:
    num = (i+1) * 1900 * p * (q ** i)
    if num < 10 ** (-6):
        break
    sum += num
    i += 1

print(int(sum+1))


Failing test case input:
000 2

Expected output:
14400


Actual output:
7600


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())

p = 0.5 ** M
q = 1 - p
i = 0
sum = 0
while True:
    num = (i + 1) * (100 * (N-M) + 1900 * M) * p * (q ** i)
    if num < 10 ** (-6):
        break
    sum += num
    i += 1

print(int(sum+1))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
print(2**M)

Failing test case input:
000 2

Expected output:
14400


Actual output:
4


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
print((1900*M+100*(N-M))*(2**M))

Problem: p03549
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m = map(int, input().split())
ans = 0
ans += pow(2,m)*1900 * m + 100 * (n - m)
print(ans)


Failing test case input:
000 2

Expected output:
14400


Actual output:
15000


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
ans = 0
ans += pow(2, m) * (1900 * m + 100 * (n - m))
print(ans)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())

time = 100 * (n - m) + 19000 * m
ans = time * 2**m
print(ans)

Failing test case input:
000 2

Expected output:
14400


Actual output:
151200


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())

time = 100 * (n - m) + 1900 * m
ans = time * 2**m
print(ans)

Problem: p03549
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, M = map(int, input().split())
print(100 * N + 1900 * M)

Failing test case input:
000 2

Expected output:
14400


Actual output:
3800


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
print((100 * (N - M) + 1900 * M) * (2**M))

Problem: p03549
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n, m = map(int, input().split())

ans = 2**m + (1900*m + 100*(n-m))
print(ans)

Failing test case input:
000 2

Expected output:
14400


Actual output:
3604


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())

ans = 2**m * (1900*m + 100*(n-m))
print(ans)

Problem: p03549
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):

N, M = map(int, input().rstrip().split(' '))

print(((1900*M) + (N - M)) * 2**M)

Failing test case input:
000 2

Expected output:
14400


Actual output:
15192


Fixed submission (verdict: Accepted):
N, M = map(int, input().rstrip().split(' '))
 
print(((1900*M) + (N - M) * 100) * 2**M)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M=list(map(int, input().split()))
print(2**M*1900*M+100*(N-M))


Failing test case input:
000 2

Expected output:
14400


Actual output:
15000


Fixed submission (verdict: Accepted):
N, M=list(map(int, input().split()))
print(2**M*(1900*M+100*(N-M)))
Problem: p03549
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n, m = map(int, input().split())
ans = (1900 * m + 100 * (n - m)) / ((1 / 2) ** m)
print(ans)

Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
ans = int((1900 * m + 100 * (n - m)) / ((1 / 2) ** m))
print(ans)

Problem: p03549
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):


import sys
import math
import time

import collections
from collections import deque
import queue
import copy






NM = str(input()).split()
N = int(NM[0])
M = int(NM[1])

p = (1/2)**M
q = 1/p

ans = q*(M*1900)+q*((N-M)*100)

print(ans)



Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):


import sys
import math
import time

import collections
from collections import deque
import queue
import copy






NM = str(input()).split()
N = int(NM[0])
M = int(NM[1])

p = (1/2)**M
q = 1/p

ans = q*(M*1900)+q*((N-M)*100)

print(int(ans))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = map(int,input().split())

p = 1-(1/2)**M
print((1900 * M + 100 * (N - M)) / (1 - p))


Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())

p = 1-(1/2)**M
time = 1900 * M + 100 * (N - M)
ans = time / (1 - p)
print(int(ans))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def solve(N, M):
    p = 1 / pow(0.5, M)
    return ((N - M) * 100 + M * 1900) * p

if __name__ == "__main__":
    N, M = tuple(map(int, input().split(" ")))
    print(solve(N, M))


Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
def solve(N, M):
    p = 1 / pow(0.5, M)
    return int(((N - M) * 100 + M * 1900) * p)

if __name__ == "__main__":
    N, M = tuple(map(int, input().split(" ")))
    print(solve(N, M))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = map(int,input().split())
ans = (N-M)*100+1900*M*2**M
print(ans)

Failing test case input:
000 2

Expected output:
14400


Actual output:
15000


Fixed submission (verdict: Accepted):
N,M = map(int,input().split())
ans = ((N-M)*100+1900*M)*2**M
print(ans)

Problem: p03549
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N, M = map(int, input().split())
print((100 * N + 1900 * M) * (2**M))

Failing test case input:
000 2

Expected output:
14400


Actual output:
15200


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
print((100 * (N - M) + 1900 * M) * (2**M))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n,m=list(map(int,input().split()))

E=2**m*1900*m+100*(n-m)

print(E)

Failing test case input:
000 2

Expected output:
14400


Actual output:
15000


Fixed submission (verdict: Accepted):
n,m=list(map(int,input().split()))
E=2**m*(1900*m+100*(n-m))

print(E)
Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
p = (1/2)**m
x = 100*(n-m)+1900*m
print(x/p)

Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
p = (1/2)**m
x = 100*(n-m)+1900*m
print(int(x/p))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = list(map(int, input().split()))

print((m * 1800 + 100 * (n - m)) * (2 ** m))

Failing test case input:
000 2

Expected output:
14400


Actual output:
13600


Fixed submission (verdict: Accepted):
n, m = list(map(int, input().split()))

print((m * 1900 + 100 * (n - m)) * (2 ** m))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M = map(int,input().split(" "))

A = 100 * (N-M) + 1900 * M
C = A / ((2**M) - 1)

ans = C * (2**M)

print(ans)

Failing test case input:
000 2

Expected output:
14400


Actual output:
4800.0


Fixed submission (verdict: Accepted):
N,M = map(int,input().split(" "))

A = 100 * (N-M) + 1900 * M

ans =  A * (2**M) 

print(int(ans))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int, input().split())
print(1800*m+100*n)

Failing test case input:
000 2

Expected output:
14400


Actual output:
3600


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
print((1800*m+100*n)*2**m)
Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
n, m = map(int, input().split())
s = 0
p = [0.0]
k = 1
s_old = -1.0
while s - s_old >= 0.0000001:
    pr = (1 - sum(p)) / (2**m)
    p.append(pr)
    s_old = s
    s += (1900 * m + 100 * (n - m)) * k * pr
    k += 1
    print(s)
print(math.ceil(s))



Failing test case input:
000 2

Expected output:
14400


Actual output:
900.0
2250.0
3768.75
5287.5
6711.328125
7992.7734375
9114.0380859375
10075.1220703125
10886.036682128906
11561.798858642578
12119.302654266357
12575.442123413086
12946.055442094803
13245.396968722343
13485.939266905189
13678.373105451465
13831.718820543028
13953.493358998094
14049.898201941687
14126.007288476103
14185.943194121955
14233.035691415125
14269.960490429088
14298.858159222624
14321.434462967574
14339.043979888635
14352.759084413692
14363.426387933183
14371.712596917072
14378.141552163192
14383.123992478933
14386.981365626605
14389.964802670509
14392.270185840798
14394.050077259035
14395.423136353103
14396.481536071447
14397.296789908552
14397.924320822638
14398.407036910396
14398.77812490286
14399.063229092193
14399.282148380431
14399.450156206287
14399.579025845438
14399.677825902121
14399.753536815122
14399.81152815274
14399.855927770606
14399.88990706999
14399.91590123402
14399.935779124165
14399.950974242114
14399.96258560583
14399.971455397557
14399.978228693057
14399.98339937846
14399.987345427848
14399.990355991391
14399.992652183924
14399.99440303073
14399.995737692638
14399.996754834168
14399.997529799144
14399.9981201045
14399.998569644727
14399.998911908311
14399.999172437307
14399.999370707534
14399.999521565316
14399.999636324985
14399.999723606985
14399.999789977674
14399.999840437582
14399.999878793933
14399.999907944757
14399.999930095546
14399.99994692439
14399.999959707835
14399.99996941678
14399.999976789513
14399.999982387324
14399.999986636878
14399.999989862443
14399.999992310413
14399.999994167989
14399.999995577375
14399.999996646564
14399.999997457568
14399.999998072657
14399.999998539095
14399.999998892772
14399.999999160918
14399.99999936419
14399.999999518272
14399.999999635049
14399.999999723539
14400


Fixed submission (verdict: Accepted):
import math
n, m = map(int, input().split())
s = 0
p = [0.0]
k = 1
s_old = -1.0
while s - s_old >= 0.0000001:
    pr = (1 - sum(p)) / (2**m)
    p.append(pr)
    s_old = s
    s += (1900 * m + 100 * (n - m)) * k * pr
    k += 1
print(math.ceil(s))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n, m = map(int,input().split())
ans = 0
count  = 0

import math

not_c = 1-(1/2)**m
c = (1/ 2) ** m
s = 1900





ans = s * c /((1-not_c) ** 2)

print(int(ans))

Failing test case input:
000 2

Expected output:
14400


Actual output:
7600


Fixed submission (verdict: Accepted):
n, m = map(int,input().split())
ans = 0
count  = 0

import math

not_c = 1-(1/2)**m
c = (1/ 2) ** m
s = 1900





ans = s * c /((1-not_c) ** 2)
x = 1900 * m + 100*(n-m)
print(int(x / c))
Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
X = 100 * (N-M) + 1900 * M
Y = (1 / 2)**M
print(X * Y / ((1 - Y) ** 2))


Failing test case input:
000 2

Expected output:
14400


Actual output:
1600.0


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
X = 100 * (N-M) + 1900 * M
Y = (1 / 2)**M
print(int(X/Y))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())
X = 100 * (N-M) + 1900 * M
Y = (1 / 2)**M
print(int(X * Y / ((1 - Y) ** 2)))


Failing test case input:
000 2

Expected output:
14400


Actual output:
1600


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())
X = 100 * (N-M) + 1900 * M
Y = (1 / 2)**M
print(int(X/Y))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=list(map(int,input().split()))
p=1/(2**M)

print((1900*M+100*(N-M))*1/p)

Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
N,M=list(map(int,input().split()))
p=1/(2**M)

print(int((1900*M+100*(N-M))*1/p))

Problem: p03549
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n, m = map(int, input().split())
t = 1900*m + 100*(n-m)
p = (1/2)**m
print(t/p)

Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
n, m = map(int, input().split())
t = 1900*m + 100*(n-m)
p = (2)**m
print(t*p)

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):


n,m = map(int,input().split())
n = n-m
print( (1900 * m + 100 * n) * 2 ** 5 )


Failing test case input:
000 2

Expected output:
14400


Actual output:
115200


Fixed submission (verdict: Accepted):


n,m = map(int,input().split())
n = n-m
print( (1900 * m + 100 * n) * 2 ** m )

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N,M=map(int,input().split())

ans=(N-M)*100+M*1900*pow(2,M)

print(str(ans))


Failing test case input:
000 2

Expected output:
14400


Actual output:
15000


Fixed submission (verdict: Accepted):
N,M=map(int,input().split())

ans=((N-M)*100+M*1900)*pow(2,M)

print(str(ans))

Problem: p03549
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N, M = map(int, input().split())

time = (M * 1900 + (N-M) * 100) / (0.5 ** M)
print(time)

Failing test case input:
000 2

Expected output:
14400


Actual output:
14400.0


Fixed submission (verdict: Accepted):
N, M = map(int, input().split())

time = (M * 1900 + (N-M) * 100) / (0.5 ** M)
print(int(time))
Problem: p00710
Buggy submission (Python3, verdict: Wrong Answer):
first = input().split()
n = int(first[0])
r = int(first[1])
while n != 0 or r != 0:
    i = 0
    card = list(range(1,n+1))[::-1]
    while i < r:
        sh = input().split()
        p, c = list(map(int,sh))
        card = card[p-1:p+c-1] + card[:p-1] + card[p+c-1:]
        i = i + 1
    print(card)
    next = input().split()
    n, r = list(map(int,next))

Failing test case input:
5 0
3 1
3 1
2 3
1 10
10 1
8 1
0 0

Expected output:
5
1
2


Actual output:
[5, 4, 3, 2, 1]
[1, 3, 2]
[2, 1]


Fixed submission (verdict: Accepted):
first = input().split()
n = int(first[0])
r = int(first[1])
while n != 0 or r != 0:
    i = 0
    card = list(range(1,n+1))[::-1]
    while i < r:
        sh = input().split()
        p, c = list(map(int,sh))
        card = card[p-1:p+c-1] + card[:p-1] + card[p+c-1:]
        i = i + 1
    print(card[0])
    next = input().split()
    n, r = list(map(int,next))

Problem: p00710
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    n, r = map(int, input().split())

    if n == 0 and r == 0:
        break

    cards = list(range(1, n+1))[::-1]

    for _ in range(r):
        p, c = map(int, input().split())
        cards = cards[p-1:p-1+c] + cards[:p-1] + cards[p+c:]

    print(cards[0])

Failing test case input:
5 0
4 1
3 1
7 2
1 0
0 1
21 0
0 0

Expected output:
5
2
7
21


Actual output:
5
2
6
21


Fixed submission (verdict: Accepted):
while True:
    n, r = map(int, input().split())

    if n == 0 and r == 0:
        break

    cards = list(range(1, n+1))[::-1]

    for _ in range(r):
        p, c = map(int, input().split())
        cards = cards[p-1:p-1+c] + cards[:p-1] + cards[p-1+c:]

    print(cards[0])

Problem: p00710
Buggy submission (Python3, verdict: Wrong Answer):
while True:
    n, r = list(map(lambda x: int(x), input().split(" ")))
    if n == 0 and r == 0:
        break
    cards = [i for i in range(1,n+1)]
    cards = cards[::-1]

    for i in range(r):
        print(cards)
        p, c = list(map(lambda x: int(x), input().split(" ")))
        p -= 1
        cards = cards[p:p+c] + cards[0:p] + cards[p+c:]
    
    print(cards[0])


Failing test case input:
1 -1
3 1
3 1
10 3
0 10
10 1
8 -1
0 0

Expected output:
1
1
1


Actual output:
1
[3, 2, 1]
1
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
[1, 10, 9, 8, 7, 6, 5, 4, 3, 2]
1


Fixed submission (verdict: Accepted):
while True:
    n, r = list(map(lambda x: int(x), input().split(" ")))
    if n == 0 and r == 0:
        break
    cards = [i for i in range(1,n+1)]
    cards = cards[::-1]

    for i in range(r):
        p, c = list(map(lambda x: int(x), input().split(" ")))
        p -= 1
        cards = cards[p:p+c] + cards[0:p] + cards[p+c:]
    
    print(cards[0])
Problem: p00710
Buggy submission (Python3, verdict: Wrong Answer):

while True:
	n, r = map(int, input().split())
	if (n, r) == (0, 0):
		break
	cards = list(range(1, n+1))[::-1]
	print(cards)

	for i in range(r):
		p, c = map(int, input().split())
		cards = cards[p-1:p-1+c] + cards[:p-1] + cards[p-1+c:]
	print(cards[0])

Failing test case input:
4 0
3 1
3 1
10 2
1 10
10 1
11 -1
0 0

Expected output:
4
1
1
11


Actual output:
[4, 3, 2, 1]
4
[3, 2, 1]
1
[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
1
[11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1]
11


Fixed submission (verdict: Accepted):

while True:
	n, r = map(int, input().split())
	if (n, r) == (0, 0):
		break
	cards = list(range(1, n+1))[::-1]

	for i in range(r):
		p, c = map(int, input().split())
		cards = cards[p-1:p-1+c] + cards[:p-1] + cards[p-1+c:]
	print(cards[0])
Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
a = 1
for i in range(1,x+1):
    for j in range(2,4):
        if i**j <= x:
            a = max(a,i**j)
print(a)

Failing test case input:
250

Expected output:
243


Actual output:
225


Fixed submission (verdict: Accepted):
n = int(input())
a = 1
for i in range(1,n):
    for j in range(2,n):
        if i**j <= n:
            a = max(a,i**j)
        else:
            break


print(a)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
c = 1
a = int(input())
for i in range(1, int(a ** 0.5)):
  for j in range(2, int(a/ 2)):
    if i ** j <= a:
      c = max(c, i**j)
print(c)

Failing test case input:
689

Expected output:
676


Actual output:
625


Fixed submission (verdict: Accepted):
c = 1
a = int(input())
for i in range(1, int(a ** 0.5) + 1):
  for j in range(2, int(a/ 2)):
    if i ** j <= a:
      c = max(c, i**j)
print(c)

Problem: p03352
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


def solve(x):
    if x == 1:
        return 1
    f = 2
    l = [1]
    while f * f <= x:
        d = f
        while d <= x:
            l.append(d)
            d *= d
        f += 1
    return max(l)



def main():
    X = int(input())
    print(solve(X))
    return

if __name__ == '__main__':
    main()


Failing test case input:
250

Expected output:
243


Actual output:
225


Fixed submission (verdict: Accepted):


def solve(x):
    if x == 1:
        return 1
    f = 2
    l = [1]
    while f * f <= x:
        d = f
        while d <= x:
            l.append(d)
            d *= f
        f += 1
    return max(l)



def main():
    X = int(input())
    print(solve(X))
    return

if __name__ == '__main__':
    main()

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    x=int(input())
    for i in range(x,0,-1):
        for j in range(2,10):
            if int(i**(1/j))**j==i:
                print(i)
                return

main()

Failing test case input:
354

Expected output:
343


Actual output:
324


Fixed submission (verdict: Accepted):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    x=int(input())
    a=1
    for i in range(2,x+1):
        j=2
        while True:
            k=i**j
            if k>x:
                break
            if k>a:
                a=k
            j+=1
    print(a)

main()

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
x = int(input())
ans = 1 
n = math.floor(math.sqrt(x))
for i in range(2,n+1):
    a = i
    while a < x:
        a *= a 
        if a <= x: ans = max(ans, a)
print(ans)


Failing test case input:
1746

Expected output:
1728


Actual output:
1681


Fixed submission (verdict: Accepted):
import math
x = int(input())
if x < 4:
    print(1)
    exit()

ans = 1 
for i in range(2, x+1): 
    a = i 
    while a < x:
        a *= i 
        if a <= x: ans = max(ans, a)
print(ans)
Problem: p03352
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
X=int(input())
c=[]
for i in range(1,X+1):
  if i**2<=X:
    c.append(i**2)
print(max(c))
  

Failing test case input:
524

Expected output:
512


Actual output:
484


Fixed submission (verdict: Accepted):
X=int(input())
c=[]
for i in range(0,X):
  for k in range(2,10):
    if (i+1)**k<=X:
      c.append((i+1)**k)
print(max(c))

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X =int(input())

A = [1]
for i in range(1, 20):
    for j in range(2, 20):
        if i**j <= X:
            A.append(i**j)
print(max(A))

Failing test case input:
610

Expected output:
576


Actual output:
512


Fixed submission (verdict: Accepted):
X =int(input())

A = [1]
for i in range(1, 50):
    for j in range(2, 50):
        if i**j <= X:
            A.append(i**j)
print(max(A))

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())

tmp = 1
for b in range(1, X+1):
  for p in range(2, X+1):
    if b**p <= X:
      tmp = b**p
    else:
      break
print(tmp)

Failing test case input:
524

Expected output:
512


Actual output:
484


Fixed submission (verdict: Accepted):
X = int(input())

tmp = 1
for b in range(1, X+1):
  for p in range(2, X+1):
    if b**p <= X:
      if tmp < b**p:
        tmp = b**p
    else:
      break
print(tmp)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

for x_i in range(x, 0, -1):
    n = 1
    while n**2 < x_i:
        n += 1
    if n**2 == x_i:
        print(n**2)
        break

Failing test case input:
1023

Expected output:
1000


Actual output:
961


Fixed submission (verdict: Accepted):
x = int(input())

for x_i in range(x, 0, -1):
    for j in range(2, max(3, x_i)):
        n = 0
        while n**j < x_i:
            n += 1
        if n**j == x_i:
            print(x_i)
            exit()

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())

ans = 0
for b in range(X):
    for p in range(11):
        if b**p <= X:
            ans = max(ans, b**p)
print(ans)

Failing test case input:
610

Expected output:
576


Actual output:
609


Fixed submission (verdict: Accepted):
X = int(input())

ans = 0
for b in range(X+1):
    for p in range(2, 11):
        if b**p <= X:
            ans = max(ans, b**p)
print(ans)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]
ans = []
for i in range(X):
    x = X-i
    for prime in primes:
        for j in range(10):
            if prime ** j == x:
                ans.append(x)
                break
print(max(ans))

Failing test case input:
1023

Expected output:
1000


Actual output:
961


Fixed submission (verdict: Accepted):
X = int(input())
ans = []
for i in range(X):
    x = X-i
    for s in range(33):
        for j in range(2,11):
            if s ** j == x:
                ans.append(x)
                break
print(max(ans))
Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=int(input())
ans=0
for i in range(1, 32):
  temp=i
  for _ in range(2,10):
    temp *= temp
    if x >= temp and ans < temp:
      ans = temp
print(ans)

Failing test case input:
250

Expected output:
243


Actual output:
225


Fixed submission (verdict: Accepted):
x=int(input())
ans=1
for i in range(2,32):
    temp=i
    for j in range(2,10):
        temp=temp*i
        if temp<=x and temp>ans:
            ans=temp
print(ans)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

X = int(input())

if X == 1:
    print(1)
    exit()

for i in reversed(range(1, X+1)):
    for j in range(2, int(math.sqrt(i))+1):
        if math.log(i, j).is_integer():
            print(i)
            exit()

Failing test case input:
250

Expected output:
243


Actual output:
225


Fixed submission (verdict: Accepted):
import math

X = int(input())

if X == 1:
    print(1)
    exit()

for i in reversed(range(1, X+1)):
    for j in range(2, int(math.sqrt(i))+1):
        if abs(math.log(i, j) - round(math.log(i, j))) <= 0.0000001:
            print(i)
            exit()
    if i == 1:
        print(1)

Problem: p03352
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x=int(input())
a=[]
for i in range(1,300):
  for j in range(2,300):
    if i**j<=x:
      a.append(i**j)
print(a[-1])

Failing test case input:
524

Expected output:
512


Actual output:
484


Fixed submission (verdict: Accepted):
x=int(input())
a=[1]
for i in range(2,300):
  for j in range(2,300):
    if i**j<=x:
      a.append(i**j)
print(max(a))

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())
l = [2,3,5,7,11,13,17,19,23,29,31]
ans = []

for i in l:
  for j in range(50):
    if pow(i,j) <= X: 
      ans.append(pow(i,j))
    else:
      break

ans.sort(reverse= True)

for i in ans:
  if i <= X:
    print(i)
    break

Failing test case input:
1298

Expected output:
1296


Actual output:
1024


Fixed submission (verdict: Accepted):
X = int(input())
ans = []

for i in range(34):
  for j in range(2,11):
    if pow(i,j) <= X: 
      ans.append(pow(i,j))
    else:
      break

ans.sort(reverse= True)

for i in ans:
  if i <= X:
    print(i)
    break

Problem: p03352
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
x = int(input())
for i in range(1,x+1):
    for n in range(2,10):
        if i**n <= x:
            count = i**n
print(count)

Failing test case input:
524

Expected output:
512


Actual output:
484


Fixed submission (verdict: Accepted):
x = int(input())
count = 1
for i in range(1,x+1):
    for n in range(2,10):
        if i**n <= x:
            count = max(i**n,count)
print(count)
Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

num = 0
if x == 1:
    num = 1
else:
    for b in range(2,x):
        for p in range(2,11):
            tmp = pow(b, p)
            if tmp <= x and num < tmp:
                num = tmp
            else:
                break

print(num)

Failing test case input:
1746

Expected output:
1728


Actual output:
1681


Fixed submission (verdict: Accepted):
x = int(input())

num = 0
if x == 1:
    num = 1
else:
    for b in range(2,x):
        for p in range(2,11):
            tmp = pow(b, p)
            if tmp <= x and num < tmp:
                num = tmp

print(num)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
if x == 1:
    print(1)
    exit()
max = 0
for b in range(2, x):
    for p in range(2, 11):
        b_p = b**p
       
        if b_p <= x:
            if b_p > max:
                max = b_p
                
                break
print(max)


Failing test case input:
1357

Expected output:
1331


Actual output:
1296


Fixed submission (verdict: Accepted):
x = int(input())
if x == 1:
    print(1)
    exit()
ans = 0
for b in range(2, x):
    for p in range(2, 11):
        b_p = b**p
        if b_p <= x:
            ans = max(ans, b_p)
        else:
            break
print(ans)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

l = []
for i in range(1,33):
    for y in range(2,33):
        if i ** y <= x:
            l.append(i**y)
        else:
            break
print(l[-1])

Failing test case input:
1746

Expected output:
1728


Actual output:
1024


Fixed submission (verdict: Accepted):
x = int(input())

l = []
for i in range(1,35):
    for y in range(2,35):
        if i ** y <= x:
            l.append(i**y)
        else:
            break
l.sort()
print(l[-1])
Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
li = []
for i in range(1,100):
    for j in range(2,10):
        if i**j<=1000:
            li.append(i**j)
list(set(li)).sort()
ans = 1
for k in range(len(li)):
    if (li[k-1]<N)&(li[k]>=N):
        ans = li[k-1]
print(ans)

Failing test case input:
1357

Expected output:
1331


Actual output:
1


Fixed submission (verdict: Accepted):
N = int(input())
li = []
for i in range(1,100):
    for j in range(2,20):
        if i**j<=10000:
            li.append(i**j)
li2 = list(set(li))
li2.sort()
ans = 0
for k in range(len(li2)):
    if (li2[k-1]<=N)&(li2[k]>N):
        ans = li2[k-1]
print(ans)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())
ans = 0
for i in range(X):
    for j in range(2, X):
        if X >= i**j:
            ans = i**j
        else:
            break
print(ans)

Failing test case input:
524

Expected output:
512


Actual output:
484


Fixed submission (verdict: Accepted):
X = int(input())
ans = 1
for b in range(1,X):
    for p in range(2, X):
        if X < b**p:
            break
        if ans < b**p:
            ans = b**p
print(ans)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
l = [1]
for i in range(2,31):
    num = i
    num *= num
    while num < x:
        l.append(num)
        num *= num
print(max(l))

Failing test case input:
1023

Expected output:
1000


Actual output:
900


Fixed submission (verdict: Accepted):
x = int(input())
l = [1]
for i in range(2,int(x**0.5)+1):
    num = i
    num *= i
    while num <= x:
        l.append(num)
        num *= i
print(max(l))

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

ans = 0
for i in range(1, x):
    for j in range(2, x):
        if i**j < x:
            ans = i**j
            continue
        else:
            break
    break

print(ans)

Failing test case input:
1746

Expected output:
1728


Actual output:
1


Fixed submission (verdict: Accepted):
x = int(input())

ans = 1
for i in range(1, x):
    for j in range(2, x):
        if i**j <= x:
            ans = max(ans, i**j)
        else:
            break

print(ans)

Problem: p03352
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())
if X == 1: print(1)
else:
    ans = 0
    for i in range(2, X):
        while i*i <= X:
            ans = max(ans, i*i)
            i *= i
    print(ans)

Failing test case input:
1357

Expected output:
1331


Actual output:
1296


Fixed submission (verdict: Accepted):
X = int(input())

if X == 1:
    print(1)
else:
    ans = 1
    for i in range(2, int(X**0.5)+1):
        b = i
        b *= i
        while b <= X:
            ans = max(ans, b)
            b *= i
    print(ans)