Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
import sys

X = int(input())
A = []
for i in range(1, int(X**0.5)+1):
    if X%i == 0:
        A.append([i, X//i])

for i in A:
    for a in range(1, X+1):
        b = a - i[0]
        if a**4 + a**3*b + a**2*b**2 + a*b**3 + b**4 == i[1]:
            print(a, b)
            sys.exit()

Fixed submission:
import sys

X = int(input())
A = []
for i in range(1, int(X**0.5)+1):
    if X%i == 0:
        A.append([i, X//i])

for i in A:
    for a in range(1, int(X**0.5)+1):
        b = a - i[0]
        if a**4 + a**3*b + a**2*b**2 + a*b**3 + b**4 == i[1]:
            print(a, b)
            sys.exit()
Buggy python submission (verdict: Runtime Error):
import collections

N = int(input())
A = list(map(int, input().split()))

L = [i+j for i, j in enumerate(A)]
R = [i-j for i, j in enumerate(A)]

l = collections.Counter(L)
r = collections.Counter(R)

for i in l.keys():
    ans += l[i]*r[i]

print(ans)

Fixed submission:
import collections

N = int(input())
A = list(map(int, input().split()))

L = [i+j for i, j in enumerate(A)]
R = [i-j for i, j in enumerate(A)]

l = collections.Counter(L)
r = collections.Counter(R)

ans = 0
for i in l.keys():
    ans += l[i]*r[i]

print(ans)

Buggy python submission (verdict: Runtime Error):
import collections

N = int(input())
A = list(map(int, input().split()))

L = [i+j for i, j in enumerate(A)]
R = [i-j for i, j in enumerate(A)]

l = collections.Counter(L)
r = collections.Counter(L)

for i in l.keys():
    ans += l[i]*r[i]

print(ans)

Fixed submission:
import collections

N = int(input())
A = list(map(int, input().split()))

L = [i+j for i, j in enumerate(A)]
R = [i-j for i, j in enumerate(A)]

l = collections.Counter(L)
r = collections.Counter(R)

ans = 0
for i in l.keys():
    ans += l[i]*r[i]

print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

ans = 0
for l in range(N-1):
    for r in range(l+2, N):
        if A[l] > N-l:
            break
        if r-l == A[l] + A[r]:
            ans += 1

print(ans)

Fixed submission:
import collections

N = int(input())
A = list(map(int, input().split()))

L = [i+j for i, j in enumerate(A)]
R = [i-j for i, j in enumerate(A)]

l = collections.Counter(L)
r = collections.Counter(R)

ans = 0
for i in l.keys():
    ans += l[i]*r[i]

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

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

for i in range(1, N+1):
    print(A.count(i))

Fixed submission:
import collections

N = int(input())

A=list(map(int, input().split()))
c = collections.Counter(A)

for i in range(1, N+1):
    print(c[i])
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

ans = 0
for i in range(1, N+2):
    saisyo += i-1
    saidai += N-i+1
    if i >= K:
        ans += (saidai - saisyo + 1)
    
print(ans%(10**9+7))

Fixed submission:
N, K = map(int, input().split())

ans, saidai, saisyo = 0, 0, 0
for i in range(1, N+2):
    saisyo += i-1
    saidai += N-i+1
    if i >= K:
        ans += (saidai - saisyo + 1)
    
print(ans%(10**9+7))

Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())

for i in range(1, N+2):
    saisyo += i-1
    saidai += N-i+1
    if i >= K:
        ans += (saidai - saisyo + 1)
    
print(ans%(10**9+7))

Fixed submission:
N, K = map(int, input().split())

ans, saidai, saisyo = 0, 0, 0
for i in range(1, N+2):
    saisyo += i-1
    saidai += N-i+1
    if i >= K:
        ans += (saidai - saisyo + 1)
    
print(ans%(10**9+7))

Buggy python submission (verdict: Time Limit Exceeded):
from itertools import combinations

N, K = map(int, input().split())

A = []
for i in range(0, N+1):
    A.append(i)

ans = 0
for i in range(K, N+2):
    X = list(combinations(A, i))
    B = set()
    for j in X:
        B.add(sum(j))
    ans += len(B)

print(ans)

Fixed submission:
N, K = map(int, input().split())

ans, saidai, saisyo = 0, 0, 0
for i in range(1, N+2):
    saisyo += i-1
    saidai += N-i+1
    if i >= K:
        ans += (saidai - saisyo + 1)
    
print(ans%(10**9+7))
Buggy python submission (verdict: Runtime Error):
import math

K = int(input())

ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        x = math.gcd(i, j)
        for k in range(1, K+1):
            count += math.gcd(x, k)

print(ans)

Fixed submission:
import math

K = int(input())

ans = 0
for i in range(1, K+1):
    for j in range(1, K+1):
        x = math.gcd(i, j)
        for k in range(1, K+1):
            ans += math.gcd(x, k)

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())

saitei = N
for i in range(N//K+2):
    N = abs(N-K)
    saitei = min(saitei, N)

print(saitei)

Fixed submission:
N, K = map(int, input().split())

a = N//K
b = N%K
c = abs(b-K) 

print(min(b, c))
Buggy python submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = sorted(map(int, input().split()))

length = K//2
for i in range(N-1):
    length = max(A[i+1] - A[i], length)
    if lenghth == A[i+1] - A[i]:
        ans = A[i] + K - A[i+1]
      
if length <= K//2:
    ans = A[-1] - A[0]
print(ans)

Fixed submission:
K, N = map(int, input().split())
A = sorted(map(int, input().split()))

length = A[0] + K - A[-1]
for i in range(N-1):
    length = max(A[i+1] - A[i] , length)
    if length == A[i+1] - A[i]:
        ans = A[i] + K - A[i+1]
      
if length == A[0] + K - A[-1]:
    ans = A[-1] - A[0]
print(ans)

Buggy python submission (verdict: Runtime Error):
K, N = map(int, input().split())
A = sorted(map(int, input().split()))

length = K//2
for i in range(N-1):
    length = max(A[i+1] - A[i] , length)
    if lenghth == A[i+1] - A[i]:
        ans = A[i] + K - A[i+1]
      
if length == K//2:
    ans = A[-1] - A[0]
print(ans)

Fixed submission:
K, N = map(int, input().split())
A = sorted(map(int, input().split()))

length = A[0] + K - A[-1]
for i in range(N-1):
    length = max(A[i+1] - A[i] , length)
    if length == A[i+1] - A[i]:
        ans = A[i] + K - A[i+1]
      
if length == A[0] + K - A[-1]:
    ans = A[-1] - A[0]
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N, X, Y = map(int, input().split())

L = []
for i in range(1, N+1):
    for j in range(i+1, N+1):
        L.append(min(j-i, abs(X-i)+abs(Y-j)+1))

for i in range(1, N):
    print(L.count(i))

Fixed submission:
import collections

N, X, Y = map(int, input().split())

L = []
for i in range(1, N+1):
    for j in range(i+1, N+1):
        L.append(min(j-i, abs(X-i)+abs(Y-j)+1))

c = collections.Counter(L)

for i in range(1, N):
    print(c[i])
Buggy python submission (verdict: Runtime Error):
N, Y, A, B, C = map(int, input().split())

P = list(map(int, input().split()))
Q = list(map(int, input().split()))
R = list(map(int, input().split()))
        
P.sort(reverse=True)
Q.sort(reverse=True)
R.sort(reverse=True)

A=P[:X]+Q[:Y]+R

A.sort(reverse=True)

print(A[X+Y])

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

P = list(map(int, input().split()))
Q = list(map(int, input().split()))
R = list(map(int, input().split()))
        
P.sort(reverse=True)
Q.sort(reverse=True)
R.sort(reverse=True)

A=P[:X]+Q[:Y]+R

A.sort(reverse=True)

print(sum(A[:X+Y]))
Buggy python submission (verdict: Runtime Error):
S = input()
if S = "AAA" or "BBB":
    print("No")
else:
    print("Yes")

Fixed submission:
S = input()
if S == "AAA" or S == "BBB":
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
A, B, C = map(int, input().split())
if len(set(A, B, C)) == 2:
    print("Yes")
else:
    print("No")

Fixed submission:
A, B, C = map(int, input().split())
if len({A, B, C}) == 2:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
ans = True
for i in A:
    if i%2 == 0:
        if i%3 == 0 or i%5 == 0:
            continue
        else:
            ans = False
print("APPROVED" if ans==True else "DENIED")

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
ans = True
for i in A:
    if i%2 == 0:
        if i%3 == 0 or i%5 == 0:
            continue
        else:
            ans = False
print("APPROVED" if ans==True else "DENIED")
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())

A=[]
B=[]
C=[]
saidai = 0
for i in range(N):
    A.append(input())
C=sorted(set(A))

for i in C:
    y = A.count(i)
    B.append([i, y])
    saidai = max(y, saidai)

for i in range(len(B)):
    if B[i][1] == saidai:
        print(B[i][0])

Fixed submission:
from collections import Counter
N = int(input())
 
A=[]
for i in range(N):
    A.append(input())

B = Counter(A)

saidai = max(B.values())

C=[]
for i, j in B.items():
    if j == saidai:
        C.append(i)
C.sort()
for i in C:
    print(i)

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

A=[]
B=[]
saidai = 0
for i in range(N):
    x = input()
    A.append(x)
    y = A.count(x)
    B.append([x, y])
    saidai = max(y, saidai)
B.sort() 
for i in range(N):
    if B[i][1] == saidai:
        print(B[i][0])

Fixed submission:
from collections import Counter
N = int(input())
 
A=[]
for i in range(N):
    A.append(input())

B = Counter(A)

saidai = max(B.values())

C=[]
for i, j in B.items():
    if j == saidai:
        C.append(i)
C.sort()
for i in C:
    print(i)
Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
list=list(map(int, input().split()))
m=0
for i in range(N+K-1):
    m=max(m, sum(list[i:i+K]))
    if m == sum(list[i:i+K]):
        n = i
a=list[n:n+K]
su=0
for i in a:
    su+=sum(range(i+1))/i
print(su)

Fixed submission:
N, K = map(int, input().split())
list=list(map(int, input().split()))
a=[]
sum=0
for i in list:
    sum+=((i-1)*(1/2)+1)
    a.append(sum)
ma=a[K-1]
for i in range(N-K):
    ma = max(ma, a[i+K]-a[i])
print(ma)

Buggy python submission (verdict: Time Limit Exceeded):
N, K = map(int, input().split())
list=list(map(int, input().split()))
a=[]
for i in list:
    a.append(sum(range(i+1))/i)
b=[]
ma=0
for i in range(N+K-1):
    ma = max(ma, sum(a[i:i+K]))
print(ma)

Fixed submission:
N, K = map(int, input().split())
list=list(map(int, input().split()))
a=[]
sum=0
for i in list:
    sum+=((i-1)*(1/2)+1)
    a.append(sum)
ma=a[K-1]
for i in range(N-K):
    ma = max(ma, a[i+K]-a[i])
print(ma)
Buggy python submission (verdict: Time Limit Exceeded):
N, K= map(int, input().split())
H=list(map(int, input().split()))
if K>=len(H):
    print(0)
else:
    if K==0:
        print(sum(H))
    else:
        for i in range(K):
            H=sorted(H)
            H.pop(-1)
        print(sum(H))

Fixed submission:
N, K= map(int, input().split())
H=list(map(int, input().split()))
if K>=len(H):
    print(0)
else:
    if K==0:
        print(sum(H))
    else:
        H=sorted(H)
        print(sum(H[:-K]))

Buggy python submission (verdict: Time Limit Exceeded):
N, K= map(int, input().split())
H=list(map(int, input().split()))
if K>=len(H):
    print(0)
else:
    for i in range(K):
        H=sorted(H)
        H.pop(-1)
    print(sum(H))

Fixed submission:
N, K= map(int, input().split())
H=list(map(int, input().split()))
if K>=len(H):
    print(0)
else:
    if K==0:
        print(sum(H))
    else:
        H=sorted(H)
        print(sum(H[:-K]))

Buggy python submission (verdict: Time Limit Exceeded):
N, K= map(int, input().split())
H=list(map(int, input().split()))
if K>=len(H):
    print(0)
else:
    for i in range(K):
        index=H.index(max(H))
        H.pop(index)
    print(sum(H))

Fixed submission:
N, K= map(int, input().split())
H=list(map(int, input().split()))
if K>=len(H):
    print(0)
else:
    if K==0:
        print(sum(H))
    else:
        H=sorted(H)
        print(sum(H[:-K]))
Buggy python submission (verdict: Time Limit Exceeded):
H=int(input())
i=0
count=1
while True:
    H=H//2
    i+=1
    count+=2**i
    if H==1:
        print(count)
        break

Fixed submission:
H = int(input())
if H==1:
    print(1)
else:
    for i in range(1, 50):
        if 2**i <= H < 2**(i+1):
            print(2**(i+1)-1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
list=list(input().split() for j in range(N))
count=0
m=list[0]
for i in list:
    a=i
    if m >= a:
        count+=1
    m = a
print(count)

Fixed submission:
N = int(input())
list=list(map(int, input().split()))
count=0
m=list[0]
for i in list:
    if m >= i:
        count+=1
    m = min(m, i)
print(count)
Buggy python submission (verdict: Runtime Error):
C=str(input())
abc=['a', 'b', 'c', 'd' , 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
print(abc[abc.index(C)+1)])


Fixed submission:
C=str(input())
abc=['a', 'b', 'c', 'd' , 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
print(abc[abc.index(C)+1])
Buggy python submission (verdict: Runtime Error):
N, M=map(int, input().split())
P=[]
S=[]
for i range(M):
  p, s = map(int, input().split())
  count('WA')
  count('AC')
  P.append(p)
  S.append(s)
  if i in range(M):
    index=P.index(i+1)
    if S[index]=='WA':
      WA+=1
    else:
      AC=1
      if AC!=0:
        WA=0
      return break
print(AC, WA)

Fixed submission:
N, M = map(int, input().split())
P=0
AC = [0]*(N+1)
WA = [0]*(N+1)
for i in range(M):
    p, s =input().split()
    if s == "AC":
        AC[int(p)] = 1
    else:
        if AC[int(p)] == 1:
            continue
        else:
            WA[int(p)] += 1
for i in range(N+1):
    if AC[i] == 0:
        WA[i] = 0
print(sum(AC), sum(WA))
Buggy python submission (verdict: Runtime Error):
from collections import deque

H, W = map(int, input().split())

G = []
for i in range(H):
    G.append(list(input()))


move = [[0, 1], [0, -1], [0, 1], [1, 0]]
saidai = 0
for sy in range(H):
    for sx in range(W):
        if G[sy][sx] == "#":
            break
        queue = deque([[sy, sx]])
        G[sy][sx] = 0
        visited = [[0]*W for i in range(H)]
        while queue:
            y, x = queue.popleft()
            for i in move:
                iy, ix = i[0], i[1]
                if 0<=iy+y<H and 0<=ix+x<W and G[iy+y][ix+x] =="." and visited[iy+y][ix+x] == 0:
                    visited[iy+y][ix+x] = 1
                    G[iy+y][ix+x] = G[y][x] + 1
                    queue.append([iy+y, ix+x])
 
        for i in range(H):
            for j in range(W):
                if G[i][j] == "#":
                    continue
                else:
                    saidai = max(saidai, G[i][j])

print(saidai)

Fixed submission:
from collections import deque

H, W = map(int, input().split())

G = []
for i in range(H):
    G.append(list(input()))


move = [[0, 1], [0, -1], [-1, 0], [1, 0]]
saidai = 0
for sy in range(H):
    for sx in range(W):
        if G[sy][sx] == ".":
            queue = deque([[sy, sx]])
            visited = [[-1]*W for i in range(H)]
            visited[sy][sx] = 0
            while queue:
                y, x = queue.popleft()
                for i in move:
                    iy, ix = i[0], i[1]
                    if 0<=iy+y<H and 0<=ix+x<W and G[iy+y][ix+x] =="." and visited[iy+y][ix+x] == -1:
                        visited[iy+y][ix+x] = visited[y][x] + 1
                        queue.append([iy+y, ix+x])
        
            for i in range(H):
                for j in range(W):
                        saidai = max(saidai, visited[i][j])
            queue = []
            visited = [[0]*W for i in range(H)]
print(saidai)
Buggy python submission (verdict: Time Limit Exceeded):
A, B, K = map(int, input().split())
for i in range(K):
    if A >= 1:
        A -= 1
    elif B >= 1:
        B -= 1
    else:
        continue
print(A, B)

Fixed submission:
A, B, K = map(int, input().split())
if K <= A:
    print(A-K, B)
elif A < K <= A+B:
    print(0, B-(K-A))
else:
    print(0, 0)
Buggy python submission (verdict: Runtime Error):
import collections

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())

for i in range(N-K):
    if T[i] == T[i+K]:
        T[i+K] = "a"

c = colelctions.Counter(T)

print(c["r"]*P + c["s"]*R + c["p"]*S)

Fixed submission:
import collections

N, K = map(int, input().split())
R, S, P = map(int, input().split())
T = list(input())

for i in range(N-K):
    if T[i] == T[i+K]:
        T[i+K] = "a"

c = collections.Counter(T)

print(c["r"]*P + c["s"]*R + c["p"]*S)
Buggy python submission (verdict: Runtime Error):
from fractions import gcd
A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Fixed submission:
import fractions
A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Fixed submission:
import fractions
A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Buggy python submission (verdict: Runtime Error):
import math
A, B = 3, 4
lcm = A//math.gcd(A, B)*B

print(lcm)

Fixed submission:
import fractions
A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

A, B = map(int, input().split())
lcm = A*B//fractions.gcd(A, B)

print(lcm)

Fixed submission:
import fractions
A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))

Buggy python submission (verdict: Runtime Error):
from fractions import gcd

A, B = map(int, input().split())
lcm = A//fractions.gcd(A, B)*B

print(lcm)

Fixed submission:
import fractions
A,B=map(int,input().split())
print(A*B//fractions.gcd(A,B))
Buggy python submission (verdict: Runtime Error):
N = int(input())

X = [[[-1]*N] for i in range(N)]
for i in range(N):
    a = int(input())
    for i in range(a):
        b, c = map(int, input().split())
        X[i][b-1] = c
ans = 0
for i in range(2**N):
    Y = [0]*(N)
    for j in range(N):
        if ((i >> j) & 1):
            Y[j] = 1
    for j in range(N):
        if Y[j] == 1:
            for k in range(N):
                if X[j][k] == -1:
                    continue
                if X[j][k] != Y[j]:
                    Y[j] = 0
    ans = max(ans, sum(Y))

print(ans)

Fixed submission:
N = int(input())

X = [[-1]*N for i in range(N)]
for i in range(N):
    a = int(input())
    for j in range(a):
        b, c = map(int, input().split())
        X[i][b-1] = c
ans = 0
for i in range(2**N):
    Y = [0]*(N)
    for j in range(N):
        if ((i >> j) & 1):
            Y[j] = 1
    flag = True
    for j in range(N):
        if Y[j] == 1:
            for k in range(N):
                if X[j][k] == -1:
                    continue
                if X[j][k] != Y[k]:
                    flag = False
    if flag:
        ans = max(ans, sum(Y))

print(ans)
Buggy python submission (verdict: Runtime Error):
import numpy as np
 
mod = 10**9 + 7
 
N = int(input())
A = np.array(list(map(int, input().split())))
 
 
ans = 0
for n in range(len(bin(max(A)))):   
    n_1 = np.count_nonzero((A >> n)&1)   
    n_0 = N - num_1                       
    ans += ((2 ** n)*n_1*n_0) % mod

print(ans%mod)

Fixed submission:
import numpy as np
 
data = int(input())
array = np.fromiter(map(int, input().split()), np.int64)
 
result = 0
for bit in range(60):
    array01 = int((array & 1).sum())
    result = (result + array01 * (data - array01) * (1 << bit)) % 1000000007
    array >>= 1
print(result)

Buggy python submission (verdict: Runtime Error):
import numpy as np
 
mod = 10**9 + 7
 
N = int(input())
A = np.array(list(map(int, input().split())))
 
 
ans = 0
for n in range(len(bin(max(A)))):   
    n_1 = np.count_nonzero((A >> n)&1)   
    n_0 = N - num_1                       
    ans += ((2 ** n)*n_1*n_0) % mod

print(ans%mod)

Fixed submission:
import numpy as np
 
data = int(input())
array = np.fromiter(map(int, input().split()), np.int64)
 
result = 0
for bit in range(60):
    array01 = int((array & 1).sum())
    result = (result + array01 * (data - array01) * (1 << bit)) % 1000000007
    array >>= 1
print(result)
Buggy python submission (verdict: Runtime Error):
from queue import deque

N = int(input())

A = []
B = [[]for i in range(N)]

for i in range(N-1):
    a, b = map(int, input().split())
    A.append([a, b])
    B[a-1].append(b-1)

X = max(len(i) for i in B)

print(X)

q = deque([0])
color = [[-1]*N]
ans = {}
while q:
    nord = q.popleft()
    c = 0
    for i, v in enumerate(B[nord]):
        if color[v] == i:
            c += 1
        color[i] = c + i 
        ans[(nord, i)] = c + i
        q.append(v)

for i, j in B:
    print(ans[(i-1, j-1)]+1)

Fixed submission:
from queue import deque

N = int(input())

A = []
B = [[]for i in range(N)]

for i in range(N-1):
    a, b = map(int, input().split())
    A.append([a, b])
    
for i, j in A:
    B[i-1].append(j-1)

q = deque([0])
color = [-1]*N
ans = {}
saidai = 0
while q:
    nord = q.popleft()
    c = 0
    for i, v in enumerate(B[nord]):
        if color[nord] == i:
            c += 1
        color[v] = c + i 
        ans[(nord, v)] = c + i
        q.append(v)
        saidai = max(saidai,i+c+1)

print(saidai)

for i, j in A:
    print(1+ans[(i-1, j-1)])
Buggy python submission (verdict: Runtime Error):
N = int(input())
for i in range(1, int(N**(1/2))):
    if N%i == 0:
        ans = i - 1 + (N//i -1)
print(ans)

Fixed submission:
N = int(input())
for i in range(1, 1+int(N**(1/2))):
    if N%i == 0:
        ans = i - 1 + (N//i -1)
print(ans)
Buggy python submission (verdict: Runtime Error):
import math

a, b, x = map(int, input().split())

if x >= a**2*b/2:
    print(math.degrees(math.atan(2*(a**2*b-x)/a**3)))

else:
    print(math.degrees(math.atan(a**2*b/(2*x)))

Fixed submission:
import math

a, b, x = map(int, input().split())

if x >= a**2*b/2:
    print(math.degrees(math.atan(2*(a**2*b-x)/a**3)))

else:
    print(math.degrees(math.atan(b**2*a/(2*x))))
Buggy python submission (verdict: Runtime Error):
from functools import reduce
import collections

N = int(input())
D = list(map(int, input().split()))

ans = 0
for i in range(N):
    ans += reduce(mul, D)
    queue.popleft()
print(ans)

Fixed submission:
import itertools

N = int(input())
D = list(map(int, input().split()))
S = list(itertools.accumulate(D))

ans = 0
for i in range(N-1):
    ans += D[i]*(S[-1]-S[i])
print(ans)