Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
ans = 0
MOD = 10 ** 9 + 7
for i in range(N - 1):
	tmp = sum(A[0: i + 1]) * A[i + 1]
	ans += (tmp % MOD)
print(ans % MOD)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans = 0
MOD = 10 ** 9 + 7
s = 0
for i in range(N - 1):
	s += A[i]
	tmp = s * A[i + 1]
	ans += (tmp % MOD)
print(ans % MOD)
Buggy python submission (verdict: Time Limit Exceeded):
H, W, M = list(map(int, input().split()))
HW = list(tuple(int(x) - 1 for x in input().split()) for _ in range(M))
h = [0] * H
w = [0] * W
for hi, wi in HW:
	h[hi] += 1
	w[wi] += 1
hm = max(h)
wm = max(w)

hh = [i for i, v in enumerate(h) if v == hm]
ww = [i for i, v in enumerate(w) if v == wm]

ans = hm + wm - 1
for h in hh:
	for w in ww:
		if (h, w) not in HW:
			ans += 1
			break 	
	else:
		continue
	break
print(ans)


Fixed submission:
H, W, M = list(map(int, input().split()))
HW = set(tuple(int(x) - 1 for x in input().split()) for _ in range(M))
h = [0] * H
w = [0] * W
for hi, wi in HW:
	h[hi] += 1
	w[wi] += 1
hm = max(h)
wm = max(w)

hh = [i for i, v in enumerate(h) if v == hm]
ww = [i for i, v in enumerate(w) if v == wm]

ans = hm + wm - 1
for h in hh:
	for w in ww:
		if (h, w) not in HW:
			ans += 1
			break 	
	else:
		continue
	break
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
H, W, M = list(map(int, input().split()))
HW = set()
hd = {}
wd = {}
for i in range(M):
	h, w = tuple(map(int, input().split()))
	HW.add((h, w))
	if h in hd:
		hd[h] += 1
	else:
		hd[h] = 1
	if w in wd:
		wd[w] += 1
	else:
		wd[w] = 1

hm = [kv[0] for kv in hd.items() if kv[1] == max(hd.values())]
wm = [kv[0] for kv in wd.items() if kv[1] == max(wd.values())]
ans = 0
for h in hm:
	for w in wm:
		if (h, w) in HW:
			ans = max(ans, (hd[h] + wd[w] - 1))
		else:
			ans = max(ans, (hd[h] + wd[w]))
print(ans)


Fixed submission:
H, W, M = list(map(int, input().split()))
HW = set(tuple(int(x) - 1 for x in input().split()) for _ in range(M))
h = [0] * H
w = [0] * W
for hi, wi in HW:
	h[hi] += 1
	w[wi] += 1
hm = max(h)
wm = max(w)

hh = [i for i, v in enumerate(h) if v == hm]
ww = [i for i, v in enumerate(w) if v == wm]

ans = hm + wm - 1
for h in hh:
	for w in ww:
		if (h, w) not in HW:
			ans += 1
			break 	
	else:
		continue
	break
print(ans)
Buggy python submission (verdict: Runtime Error):
X = input()
if X.isupper():
	print('A')
else:

Fixed submission:
X = input()
if X.isupper():
    print('A')
else:
    print('a')
Buggy python submission (verdict: Runtime Error):
X, N = list(map(int, input().split()))
if N != 0:
    P = list(map(int, input().split()))
    ans = 0
    L = X
    L = X
    for _ in range(N // 2):
        L = L - 1
        H = H + 1
        if L not in P:
            print(L)
            break
        if H not in P:
            print(H)
            break
else:
    print(X)

Fixed submission:
X, N = list(map(int, input().split()))
if N > 0:
    P = list(map(int, input().split()))
    l = X
    h = X
    while True:
        if l not in P:
            print(l)
            break
        if h not in P:
            print(h)
            break
        l -= 1
        h += 1
else:
    input()
    print(X)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
ans = 0

def pf(n):
    ret = []
    for i in range(2, n):
        if n % i != 0: continue
        c = 0
        while n % i == 0:
            c += 1
            n //= i
        ret.append((i, c))
    while n % 2 ==0:
        n //= 2
        ret.append(2)
    f = 3
    c = 0
    while f * f <= n:
        if n % f == 0:
            c += 1
            n //= f
        else:
            ret.append((f, c))
            c = 0
            f += 2
    if n != 1:
        ret.append((n, 1))
    return ret

for p in pf(N):
    i, c = p
    t = 1
    while c >= t:
        c -= t
        t += 1
        ans += 1
print(ans)

Fixed submission:
n = int(input())
ans = 0

d = 2
while d * d < n:
    if n % d != 0:
        d += 1
        continue

    e = d
    while n % e == 0:
        n //= e
        e *= d
        ans += 1

    while n % d == 0:
        n //= d
if n != 1:
    ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
tw ="ABC" if input().startswith("ARC") else "ARC")
print(tw)


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
tw ="ABC" if input().startsWith("ARC") else "ARC")
print(tw)


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
tw ="ABC" if lw.startsWith(input()) else "ARC")
print(tw)

Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
lw = input()
print("ABC" if lw.startsWith("ABC") else "ARC")


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):

lw = input()
print(lw.startsWith("ABC") ? "ARC" : "ABC")


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
import sys
lw = sys.argv[1]
print(lw.startsWith("ABC") ? "ARC" : "ABC")


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
import sys
lw = sys.argv[1]
retrun lw.startsWith("ABC") ? "ARC" : "ABC"


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
lw = input()
retrun lw == "ABC" ? "ARC" : "ABC"


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
import sys
lw = sys.argv[1]
return lw == "ABC" ? "ARC" : "ABC"


Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)

Buggy python submission (verdict: Runtime Error):
import sys
lw = sys.argv[1]
retrun lw == "ABC" ? "ARC" : "ABC"

Fixed submission:
tw ="ABC" if input().startswith("ARC") else "ARC"
print(tw)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input()) + 1
A = [0] + [int(i) for i in input().split()]

MAX_I = 10 ** 9
cnt = 0

for i in range(1, N):
    if MAX_I >= i + A[i]:
        for j in range(i + A[i], N):
            if (j - i) == (A[i] + A[j]):
                cnt += 1
print(cnt)

Fixed submission:
N = int(input())
A = [int(i) for i in input().split()]
i_Ai = {}
cnt = 0

for i, h in enumerate(A):
	imh = i - h
	if imh in i_Ai:
		cnt += i_Ai[imh]
	iph = i + h
	if iph in i_Ai:
		i_Ai[iph] += 1
	else:
		i_Ai[iph] = 1
print(cnt)
Buggy python submission (verdict: Runtime Error):
A, B, C = list(map(int, input().split()))

A, B = B, A
A, C = C, A
print(A, B, C)A, B, C = list(map(int, input().split()))

A, B = B, A
A, C = C, A
print(A, B, C)

Fixed submission:
A, B, C = list(map(int, input().split()))

A, B = B, A
A, C = C, A
print(A, B, C)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = list(map(int, input().split()))
if N % K == 0:
	print(0)
else:
	while True:
		N = abs(N - K)
		if abs(N - K) >= N:
			break
	print(N)

Fixed submission:
N, K = list(map(int, input().split()))
ans = min(N % K, K - (N % K))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, A, B = list(map(int, input().split()))
ans = 0
for i in range(10 ** 100):
	if N > 0:
		ans += min(N, A)
		N -= A
	else:
		break
	if N > 0:
		N -= B
	else:
		break
print(ans)


Fixed submission:
N, A, B = list(map(int, input().split()))
ans = 0
ans = N // (A + B) * A + min(A, (N % (A + B)))
print(ans)
Buggy python submission (verdict: Runtime Error):
A = [[j for j in list(map(int, input().split()))] for i in range(3)]
N = int(input())
B = []
for _ in range(N):
	b = int(input())
	for r in A:
		for i in range(len(r)):
			if r[i] == b:
				r[i] = 0
ans = False
for i in range(3):
	if sum(A[i]) == 0:
		ans = True
if not ans:
	for i in range(3):
		if A[0][i] + A[1][i] + A[2][i == 0:
			ans = True
if not ans:
	if A[0][0] + A[1][1] + A[2][2] == 0:
		ans = True
	elif A[0][2] + A[1][1] + A[2][0] == 0:
		ans = True
if ans:
	print('Yes')
else:
	print('No')


Fixed submission:
A = [[j for j in list(map(int, input().split()))] for i in range(3)]
N = int(input())
B = []
for _ in range(N):
	b = int(input())
	for r in A:
		for i in range(len(r)):
			if r[i] == b:
				r[i] = 0
ans = False
for i in range(3):
	if sum(A[i]) == 0:
		ans = True
if not ans:
	for i in range(3):
		if A[0][i] + A[1][i] + A[2][i] == 0:
			ans = True
if not ans:
	if A[0][0] + A[1][1] + A[2][2] == 0:
		ans = True
	elif A[0][2] + A[1][1] + A[2][0] == 0:
		ans = True
if ans:
	print('Yes')
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
X = list(map(int, input().split()))
ans = 100 ** 100

for p in range(1, 101):
	now = 0
	for x in X:
		now += (p - x) ** 2
	ans = min(ans, now)
print(ans)


Fixed submission:
N, K = list(map(int, input().split()))
ans = 0
while N > 0:
    N //= K
    ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))
a = []
for i in range(1, N + 1):
	j = A.index(i)
	a.append(j + 1)
print(*a)


Fixed submission:
N = int(input())
A = list(map(int, input().split()))
a = [0] * N
for i in range(N):
	a[A[i] - 1] = i + 1
print(*a)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = list(map(int, input().split()))
ans = 0
for i in range(N - 1):
	now = 0
	for j in range(i, N - 1):
		if H[j] >= H[j + 1]:
			now += 1
		else:
			break
	ans = max(ans, now)
print(ans)


Fixed submission:
N = int(input())
H = list(map(int, input().split()))
ans = 0
now = 0
for i in range(1, N):
	if H[i - 1] >= H[i]:
		now += 1
		ans = max(ans, now)
	else:
		now = 0
print(ans)
Buggy python submission (verdict: Runtime Error):
a = int(input())
s = input()
if a >= 3200:
	pint(s)
else:
	print('red')


Fixed submission:
a = int(input())
s = input()
if a >= 3200:
	print(s)
else:
	print('red')
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
if N%2 == 0:
  T = S[0:N/2]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Fixed submission:
N = int(input())
S = input()
if N%2 == 0:
  T = S[0:int(N/2)]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
if N//2 == 0:
  T = S[0:N/2]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")

Fixed submission:
N = int(input())
S = input()
if N%2 == 0:
  T = S[0:int(N/2)]
  if T+T == S:
    print("Yes")
  else:
    print("No")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
if __name__ == "__main__":
    n = int(input())
    if x<29:
        print("No")
    else:
        print("Yes")

Fixed submission:
n = int(input())
if n<30:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):

n,m,k = map(int,input().split())

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

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

x = [0]

y = [0]

for i in range(n):
    x.append(x[i]+a[i])

for i in range(m):
    y.append(y[i]+b[i])

ans = 0

cnt = m

for i in range(n+1):
    
    if x[i]<0:
        break
    
    while y[cnt]>k-x[i]:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)

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

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

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

x = [0]

y = [0]

for i in range(n):
    x.append(x[i]+a[i])

for i in range(m):
    y.append(y[i]+b[i])

ans = 0

cnt = m

for i in range(n+1):
    
    if k-x[i]<0:
        break
    
    while y[cnt]>k-x[i]:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,m,k = map(int,input().split())

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

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


ans = 0

aa = 0

for i in range(n+1):
    cnt = 0
    x = k
    x -= aa
    if i != n:
        aa += a[i]
    
    if x<0:
        break
    
    while x>0 and cnt<m:
        x -= b[cnt]
        cnt += 1
        
    if x<0:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)

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

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

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

x = [0]

y = [0]

for i in range(n):
    x.append(x[i]+a[i])

for i in range(m):
    y.append(y[i]+b[i])

ans = 0

cnt = m

for i in range(n+1):
    
    if k-x[i]<0:
        break
    
    while y[cnt]>k-x[i]:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n,m,k = map(int,input().split())

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

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

ans = 0

for i in range(n+1):
    cnt = 0
    x = k
    x -= sum(a[:i])
    
    if x<0:
        continue
    
    while x>0 and cnt<m:
        x -= b[cnt]
        cnt += 1
        
    if x<0:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)

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

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

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

x = [0]

y = [0]

for i in range(n):
    x.append(x[i]+a[i])

for i in range(m):
    y.append(y[i]+b[i])

ans = 0

cnt = m

for i in range(n+1):
    
    if k-x[i]<0:
        break
    
    while y[cnt]>k-x[i]:
        cnt -= 1
        
    ans = max(ans,cnt+i)
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import collections as c

n = int(input())

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

q = int(input())

s = sum(a)

cnt = c.Counter(a)

for i in range(100000):
    cnt[i] = a.count(i+1)

for i in range(q):
    b,c = map(int,input().split())
    s += (c-b)*cnt[b-1]
    cnt[c-1] += cnt[b-1]
    cnt[b-1] = 0
    print(s)

Fixed submission:
import collections as c

n = int(input())

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

q = int(input())

s = sum(a)

cnt = c.Counter(a)

for i in range(q):
    b,c = map(int,input().split())
    s += (c-b)*cnt[b]
    cnt[c] += cnt[b]
    cnt[b] = 0
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
import collections as c

n = int(input())

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

q = int(input())

s = sum(a)

cnt = [0]*100000

for i in range(100000):
    cnt[i] = a.count(i+1)

for i in range(q):
    b,c = map(int,input().split())
    s += (c-b)*cnt[b-1]
    cnt[c-1] += cnt[b-1]
    cnt[b-1] = 0
    print(s)

Fixed submission:
import collections as c

n = int(input())

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

q = int(input())

s = sum(a)

cnt = c.Counter(a)

for i in range(q):
    b,c = map(int,input().split())
    s += (c-b)*cnt[b]
    cnt[c] += cnt[b]
    cnt[b] = 0
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):

import collections as c

n = int(input())

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

q = int(input())

s = sum(a)

cnt = [0]*100000

for i in range(100000):
    cnt[i] = a.count(i+1)

for i in range(q):
    b,c = map(int,input().split())
    x = cnt[b-1]
    cnt[b-1] = 0
    cnt[c-1] = cnt[c-1] + x
    s += (c-b)*x
    print(s)

Fixed submission:
import collections as c

n = int(input())

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

q = int(input())

s = sum(a)

cnt = c.Counter(a)

for i in range(q):
    b,c = map(int,input().split())
    s += (c-b)*cnt[b]
    cnt[c] += cnt[b]
    cnt[b] = 0
    print(s)

Buggy python submission (verdict: Time Limit Exceeded):
import collections as c

n = int(input())

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

q = int(input())

cnt = [0]*100000

for i in range(100000):
    cnt[i] = a.count(i+1)

for i in range(q):
    b,c = map(int,input().split())
    x = cnt[b-1]
    cnt[b-1] = 0
    cnt[c-1] = cnt[c-1] + x
    ans = 0
    for s in range(100000):
        ans += (s+1)*cnt[s]
        
    print(ans)

Fixed submission:
import collections as c

n = int(input())

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

q = int(input())

s = sum(a)

cnt = c.Counter(a)

for i in range(q):
    b,c = map(int,input().split())
    s += (c-b)*cnt[b]
    cnt[c] += cnt[b]
    cnt[b] = 0
    print(s)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

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

ans = 1

for i in x:
  ans *= i
  
if ans>1000000000000000000:
  print(-1)
else:
  print(ans)

Fixed submission:
n = int(input())

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

limit = 10**18

ans = 1

q = 0

if 0 in x:
    ans = 0
else:
    for i in x:
        ans *= i
        if ans>limit:
            q = 1
            break
    
if q == 1:
    print(-1)
else:
    print(ans)
Buggy python submission (verdict: Runtime Error):
a , b = map(int,input().split())

print((a*b)//1)

Fixed submission:

import decimal

x = list(input().split())
 
a = int(x[0])
 
b = decimal.Decimal(x[1])
 
print(int(a*b))
Buggy python submission (verdict: Runtime Error):
if k<=a:
    print(k)
else:
    x = k-a
    if x<=b:
        print(a)
    else:
        print(a-(x-b))

Fixed submission:

a,b,c,k = map(int,input().split())

if k<=a:
    print(k)
else:
    x = k-a
    if x<=b:
        print(a)
    else:
        print(a-(x-b))
Buggy python submission (verdict: Time Limit Exceeded):
n , m = map(int,input().split())

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

roadssta = []
roadsfin = []

for i in range(m):
    base = input().split()
    roadssta.append(int(base[0]))
    roadsfin.append(int(base[1]))

roadssta = tuple(roadssta)

roadsfin = tuple(roadsfin)


ans = 0

ten = 1

for i in hyoukou:

    if ten not in roadssta and ten not in roadsfin:
        ans += 1
        ten += 1
        continue
    
    else:
        access = [0]
        stacnt = 0
        fincnt = 0
        
        if ten in roadssta:
            for s in roadssta:
                if s == ten:
                    access.append(hyoukou[roadsfin[stacnt]-1])
                    stacnt += 1
                else:
                    stacnt += 1
        
        if ten in roadsfin:
            for k in roadsfin:
                if k == ten:
                    access.append(hyoukou[roadssta[fincnt]-1])
                    fincnt += 1
                else:
                    fincnt += 1

        if i>max(access):
            ans += 1
            ten += 1
        else:
            ten += 1

print(ans)

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

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

roadssta = []
roadsfin = []

ten = [1]*n

for i in range(m):
    base = input().split()
    a = int(base[0])
    b = int(base[1])
    if hyoukou[a-1]>hyoukou[b-1]:
        ten[b-1] = 0
    elif hyoukou[a-1]<hyoukou[b-1]:
        ten[a-1] = 0
    else:
        ten[a-1] = 0
        ten[b-1] = 0

print(ten.count(1))

Buggy python submission (verdict: Time Limit Exceeded):
n , m = map(int,input().split())

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

roadssta = []
roadsfin = []

for i in range(m):
    base = input().split()
    roadssta.append(int(base[0]))
    roadsfin.append(int(base[1]))

ans = 0

ten = 1

for i in hyoukou:

    if ten not in roadssta and ten not in roadsfin:
        ans += 1
        ten += 1
        continue
    
    else:
        access = [0]
        stacnt = 0
        fincnt = 0
        
        for s in roadssta:
            if s == ten:
                access.append(hyoukou[roadsfin[stacnt]-1])
                stacnt += 1
            else:
                stacnt += 1
        
        for k in roadsfin:
            if k == ten:
                access.append(hyoukou[roadssta[fincnt]-1])
                fincnt += 1
            else:
                fincnt += 1

        if i>max(access):
            ans += 1
            ten += 1
        else:
            ten += 1

print(ans)

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

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

roadssta = []
roadsfin = []

ten = [1]*n

for i in range(m):
    base = input().split()
    a = int(base[0])
    b = int(base[1])
    if hyoukou[a-1]>hyoukou[b-1]:
        ten[b-1] = 0
    elif hyoukou[a-1]<hyoukou[b-1]:
        ten[a-1] = 0
    else:
        ten[a-1] = 0
        ten[b-1] = 0

print(ten.count(1))
Buggy python submission (verdict: Runtime Error):
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

x = int(input())

yakusuu = make_divisors(x)

for i in yakusuu[:len(x)//2+1]:
    y = int(x/i)
    if (y-i)%2 == 0:
        print(i+(y-i)//2,i)
    

Fixed submission:
x = int(input())

q = 0

for b in range(-120,120):
    for a in range(b+1,120):
        if a**5 - b**5 == x:
            print(a,b)
            q = 1
            break
    if q == 1:
        break

Buggy python submission (verdict: Runtime Error):
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

x = int(input())

yakusuu = make_divisors(x)

for i in yakusuu[:len(x)//2+1]:
    y = int(x/i)
    if (y-i)%2 == 0:
        print(i+(y-i)//2,(y-i)//2)
    

Fixed submission:
x = int(input())

q = 0

for b in range(-120,120):
    for a in range(b+1,120):
        if a**5 - b**5 == x:
            print(a,b)
            q = 1
            break
    if q == 1:
        break
Buggy python submission (verdict: Runtime Error):
a , b , n = map(int,input().split())
x = b - 1

def fnc(x):
    return int((a*x)/b)-a*int((x/b))

ans = []

for i in range(min(x,n)):
    ans.append(fnc(i))

print(max(ans))

Fixed submission:
a,b,n = map(int,input().split())
x = min(b-1,n)
print(int(a*x/b)-a*int(x/b))

Buggy python submission (verdict: Runtime Error):
a , b , n = map(int,input().split())
x = b - 1

def fnc(x):
    return int((a*x)/b)-a*int((x/b))

ans = []

for i in range(x):
    ans.append(fnc(i))

print(max(ans))

Fixed submission:
a,b,n = map(int,input().split())
x = min(b-1,n)
print(int(a*x/b)-a*int(x/b))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = [0]
for i in range(n):
    s = str(input())
    if s in x:
        n -= 1
    else:
        x.append(s)
print(n)

Fixed submission:
n = int(input())
x = {0}
for i in range(n):
    s = str(input())
    if s in x:
        n -= 1
    else:
        x.add(s)
print(n)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
x = [0]*n
for i in range(n):
    s = input()
    if s in x:
        n -= 1
    else:
        x[i] = s
print(n)

Fixed submission:
n = int(input())
x = {0}
for i in range(n):
    s = str(input())
    if s in x:
        n -= 1
    else:
        x.add(s)
print(n)