Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
# input
N = int(input())
X = list(map(int, input().split()))

# check
center = N // 2 - 1
for ind in range(N):
    if ind == 0:
        target = X[1:]
    elif ind == N - 1:
        target = X[:ind]
    else:
        target = X[:ind] + X[ind + 1:]
    target.sort()

    print(target[center])

Fixed submission:
# input
N = int(input())
X = list(map(int, input().split()))

# check
l, r = N // 2 - 1, N // 2
sort_x = sorted(X)
lx, rx = sort_x[l], sort_x[r]

if lx == rx:
    for i in range(N):
        print(lx)
else:
    for ind in range(N):
        target = X[ind]
        if target <= lx:
            print(rx)
        if target >= rx:
            print(lx)
Buggy python submission (verdict: Time Limit Exceeded):
# input
N = int(input())
A = list(map(int, input().split()))

full_root = [0] + A + [0]
full_place = [abs(full_root[i] - full_root[i + 1]) for i in range(N + 1)]
# check
for ind in range(1, N + 1):
    if ind == 1:
        res = sum(full_place[2:])
    elif ind == N + 1:
        res = sum(full_place[:-2])
    else:
        res = sum(full_place[:ind - 1] + full_place[ind + 1:])

    print(res + abs(full_root[ind - 1] - full_root[ind + 1]))


Fixed submission:
# input
N = int(input())
A = list(map(int, input().split()))

full_root = [0] + A + [0]
full_place = [abs(full_root[i] - full_root[i + 1]) for i in range(N + 1)]
full_res = sum(full_place)
# check
for ind in range(1, N + 1):
    res = full_res - sum(full_place[ind - 1:ind + 1]) + abs(full_root[ind - 1] - full_root[ind + 1])

    print(res)

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


root = [0] + A + [0]
# check
for ind in range(1, N + 1):
    target = [r for i, r in enumerate(root) if i != ind]
    res = sum([abs(target[i] - target[i + 1]) for i in range(N)])
    print(res)

Fixed submission:
# input
N = int(input())
A = list(map(int, input().split()))

full_root = [0] + A + [0]
full_place = [abs(full_root[i] - full_root[i + 1]) for i in range(N + 1)]
full_res = sum(full_place)
# check
for ind in range(1, N + 1):
    res = full_res - sum(full_place[ind - 1:ind + 1]) + abs(full_root[ind - 1] - full_root[ind + 1])

    print(res)

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

# check
for ind in range(N):
    target = [0] + [a for i, a in enumerate(A) if i != ind] + [0]
    res = sum([abs(target[i] - target[i + 1]) for i in range(N)])
    print(res)

Fixed submission:
# input
N = int(input())
A = list(map(int, input().split()))

full_root = [0] + A + [0]
full_place = [abs(full_root[i] - full_root[i + 1]) for i in range(N + 1)]
full_res = sum(full_place)
# check
for ind in range(1, N + 1):
    res = full_res - sum(full_place[ind - 1:ind + 1]) + abs(full_root[ind - 1] - full_root[ind + 1])

    print(res)
Buggy python submission (verdict: Runtime Error):
# input
N = int(input())
A = [list(map(int, input().split())) for i in range(2)]

# check
element = set(A[0] + A[1])
if len(element) == 1:
    print(element + (N + 1))
else:
    end_x, end_y = 1, N - 1
    x, y = 0, 0
    res = A[0][0]
    while (x, y) != (end_x, end_y):
        if x == end_x:
            y += 1
        elif y == end_y:
            x += 1
        else:
            next_right, next_down = sum(A[x][y + 1:]), sum(A[x + 1][y:])
            if next_down <= next_right:
                y += 1
            else:
                x += 1
        res += A[x][y]
    else:
        print(res)


Fixed submission:
# input
N = int(input())
A = [list(map(int, input().split())) for i in range(2)]

# check
element = set(A[0] + A[1])
if len(element) == 1:
    print(list(element)[0] * (N + 1))
else:
    res = 0
    for d in range(N):
        if d == 0:
            sum_num = A[0][0] + sum(A[1])
        elif d == N - 1:
            sum_num = sum(A[0]) + A[1][N - 1]
        else:
            sum_num = sum(A[0][:d + 1]) + sum(A[1][d:])
        if res < sum_num:
            res = sum_num
    print(res)
Buggy python submission (verdict: Runtime Error):
import math

N, D = int(input().split())
P = []
for n in N:
    X_n, Y_n = int(input().split())
    P.append((X_n, Y_n))

def distance(p:tuple):
    # d_2 = p[0] ** 2 + p[1] ** 2
    # d = math.sqrt(d_2)
    return math.sqrt(p[0] ** 2 + p[1] ** 2)

count = [p for p in P if distance(p) <= D]
print(len(count))

Fixed submission:
import math

N, D = map(int, input().split())
P = []
for n in range(N):
    X_n, Y_n = map(int, input().split())
    P.append((X_n, Y_n))

def distance(p:tuple):
    return math.sqrt(p[0] ** 2 + p[1] ** 2)

count = [p for p in P if distance(p) <= D]
print(len(count))
Buggy python submission (verdict: Runtime Error):
L, R, d = input()
count = 0
for i in range(int(L)+1, int(R)+1):
  if i % int(d) == 0:
    count = count + 1
print(count)

Fixed submission:
L, R, d = input().split()
count = 0
for i in range(int(L), int(R)+1):
  if i % int(d) == 0:
    count = count + 1
print(count)
Buggy python submission (verdict: Runtime Error):
cost = input()[0]
dvi, mod = dvimod(int(cost), 1000)
bills = dvi + 1
change = bills - mod
print(change)

Fixed submission:
cost = input()
cost = int(cost)
div, mod = divmod(cost, 1000)
if mod == 0:
    bills = div
    change = 0
else:
    bills = div + 1
    change = 1000 - mod
print(change)

Buggy python submission (verdict: Runtime Error):
cost = input()[0]
mod = cost % 1000
print(mod)

Fixed submission:
cost = input()
cost = int(cost)
div, mod = divmod(cost, 1000)
if mod == 0:
    bills = div
    change = 0
else:
    bills = div + 1
    change = 1000 - mod
print(change)
Buggy python submission (verdict: Time Limit Exceeded):
import math
import fractions
n = int(input())


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

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]
    ans%=1000000007
print(ans)


Fixed submission:
import math
import fractions
n = int(input())


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

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]

print(ans%1000000007)

Buggy python submission (verdict: Runtime Error):
import math
import fractions
n = int(input())


l = list(int() ,input().split())

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]
    ans%=1000000007
print(ans)


Fixed submission:
import math
import fractions
n = int(input())


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

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]

print(ans%1000000007)

Buggy python submission (verdict: Runtime Error):
import math
import fractions
n = int(input())


l = list(int ,input().split())

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]
    ans%=1000000007
print(ans)


Fixed submission:
import math
import fractions
n = int(input())


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

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]

print(ans%1000000007)

Buggy python submission (verdict: Time Limit Exceeded):
import math
import fractions
n = int(input())


l = input().split()
for i in range(n):
    l[i] = int(l[i])
lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]
    ans%=1000000007
print(ans)


Fixed submission:
import math
import fractions
n = int(input())


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

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]

print(ans%1000000007)

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

n = int(input())
l = []
for i in range(n):
    l[i] = int(input())
lc = 1



for i in range(n):
    lc = math.gcd(lc , l[i])/lc*l[i]

for i in range(n):
    print(lc/l[i])
    print(" ")


Fixed submission:
import math
import fractions
n = int(input())


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

lc = 1

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)


for i in range(n):
    lc = lcm(lc,l[i])
ans = 0
for i in range(n):
    ans+=lc//l[i]

print(ans%1000000007)
Buggy python submission (verdict: Runtime Error):
#include<stdio.h>
#include <string>

int main(){
    char *s;
    scanf("%s",s);
    s[0] = '2';
    s[1] = '0';
    s[2] = '1';
    s[3] = '8';
    printf("%s" ,s);
    return 0;
}

Fixed submission:
# -*- coding: utf-8 -*-
s = input()
print("2018" + s[4:len(s)])
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
A=list(map(int,input().split()))
B=[0]*N
count=0
for i in range(N):
    for j in range(N):
        if A[i]%A[j]==0:
            count+=1
            if count==2:
                break
    if count==1:
        B[i]=1
    else:
        B[i]=0
    count=0
print(sum(B))

Fixed submission:
from collections import Counter
import bisect
N = int(input())
A = list(map(int,input().split()))
cnt = Counter(A)
A.sort()
ans = 0
MX = 10**6
P = [0] * (MX+1)
for a in A:
    if P[a]==0:
        for i in range(MX+1):
            x = a*i
            if x > MX:
                break
            P[x] = 1
        if cnt[a]==1:
            ans+=1
print (ans)
Buggy python submission (verdict: Runtime Error):
k = int(input())
s = input()
if(len(s) > k):
    print(s[0:k]+'...')
else:
    print(s) 

Fixed submission:
import itertools
from collections import defaultdict
import collections
import math
import sys
import queue
sys.setrecursionlimit(200000)
mod = 1000000007

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

graph = {i: [] for i in range(1, n + 1)}
for _ in range(m):
    u, v = map(int, input().split())
    graph[u].append(v)
    graph[v].append(u)

tf = [False] * (n + 1)
sirube = [0] * (n + 1)
def bfs(v):
    q = queue.Queue()
    q.put([v,0])
    tf[v] = True
    while not q.empty():
        sub = q.get()
        now = sub[0]
        before = sub[1]
        for next in graph[now]:
            if tf[next]:
                continue
            tf[next] = True
            if sirube[next] == 0:
                sirube[next] = now
            q.put([next, now])

bfs(1)
for i in range(2, n + 1):
    if sirube[i] == 0:
        print("No")
        exit()

print("Yes")
for i in range(2, n + 1):
    print(sirube[i])
Buggy python submission (verdict: Runtime Error):
import math
A, B, N = map(int, input().split())

arr = []
for num in range(N):

  ans = math.floor((A * N) / B) - A * math.floor(N / B)
  arr.append(ans)

arr.sort()

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

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

all_tenbo = list(range(1, N+1))
not_good = []

for i in range(M):
    A, B = map(int, input().split())
    if H[A-1] <= H[B-1]:
        not_good.append(A)
    if H[B-1] <= H[A-1]:
        not_good.append(B)

print(len(list(set(all_tenbo)-set(not_good))))

Buggy python submission (verdict: Runtime Error):
N = int(input())
W = [int(input()) for _ in range(N)]
D = [W[0]]

for  i  in  range ( 1 , N ):
    b = W[i]
    if max(D) < b:
        D.append(b)
    else:
        for  j  in  range ( len ( D )):
            if D[j] >= b:
                D[j] = b
                break

print ( len ( D ))

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

all_tenbo = list(range(1, N+1))
not_good = []

for i in range(M):
    A, B = map(int, input().split())
    if H[A-1] <= H[B-1]:
        not_good.append(A)
    if H[B-1] <= H[A-1]:
        not_good.append(B)

print(len(list(set(all_tenbo)-set(not_good))))
Buggy python submission (verdict: Runtime Error):
a,b,c,d = map(int,input())
print(max(a*c,a*d,b*c,b*d))

Fixed submission:
a,b,c,d = map(int,input().split())
print(max(a*c,a*d,b*c,b*d))
Buggy python submission (verdict: Runtime Error):
l = int(input())
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == TLE:
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(RE))

Fixed submission:
l = int(input())
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == 'TLE':
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))

Buggy python submission (verdict: Runtime Error):
l = input()
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == TLE:
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(RE))

Fixed submission:
l = int(input())
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == 'TLE':
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))

Buggy python submission (verdict: Runtime Error):
l = input
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == TLE:
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(RE))

Fixed submission:
l = int(input())
n = []
for i in range(l):
  n.append(input())
ac = 0
wa = 0
tle = 0
re =0
for i in n:
  if i == 'AC':
    ac += 1
  elif i =='WA':
    wa += 1
  elif i == 'TLE':
    tle += 1
  else:
    re += 1
print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))
Buggy python submission (verdict: Runtime Error):
a_list = [chr(ord('a') + i) for i in range(26)]
n = int(input())

l_list = []
ans = ''
while n > 0:
    
    if n % 26 == 0:
        l_list.append(25)
        n = n // 26 - 1
    else:
        l_list.append(n%26)
        n = n // 26
l_list = l_list[::-1]
for i in l_list:
    ans += a_list[i]
print(ans)

Fixed submission:
alpha = input()
if alpha == alpha.upper():
    print('A')
else:
    print('a')
Buggy python submission (verdict: Runtime Error):
	a_list = [chr(ord('a') + i) for i in range(26)]
n = int(input())

l_list = []
ans = ''
while n > 0:
    
    if n % 26 == 0:
        l_list.append(25)
        n = n // 26 - 1
    else:
        l_list.append(n%26)
        n = n // 26
l_list = l_list[::-1]
for i in l_list:
    ans += a_list[i]
print(ans)

Fixed submission:
a_list = [chr(ord('a') + i) for i in range(26)]
n = int(input())

l_list = []
ans = ''
while n > 0:
    if n % 26 == 0:
        l_list.append(26)
        n = n // 26 - 1
    else:
        l_list.append(n%26)
        n = n // 26
l_list = l_list[::-1]
for i in l_list:
    ans += a_list[i-1]
print(ans)
Buggy python submission (verdict: Runtime Error):
v_list = [int(i) for i in input().split()]
for i in len(v_list):
  if v_list[i] == 0:
    print(i+1)
  


Fixed submission:
v_list = list(map(int,input().split()))
for i in range(len(v_list)):
  if v_list[i] == 0:
    print(i+1)
Buggy python submission (verdict: Runtime Error):
X,N = map(int, input().split())
num_list = list(map(int, input().split()))
if (len(num_list) == 0) or X not in num_list:
  print(X)
else:
  d = 1
  while True:
	if X - d not in num_list:
      print(X -d)
      break
    elif X + d not in num_list:
      print(X + d)
      break
    else:
      d += 1

Fixed submission:
X,N = map(int, input().split())
num_list = list(map(int, input().split()))
if (len(num_list) == 0) or X not in num_list:
    print(X)
else:
    d = 1
    while True:
        if X - d not in num_list:
            print(X -d)
            break
        elif X + d not in num_list:
            print(X + d)
            break
        else:
            d +=1
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int,input().split()))
if 0 in a:
    ans = 0
else:
    ans = 1
    for i in a:
        if ans * i > 10**18:
            ans = -1
        else:
            ans = ans * i
print(ans)

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
if 0 in a:
    ans = 0
else:
    ans = 1
    for i in a:
        if ans * i > 10**18:
            ans = -1
            break
        else:
            ans = ans * i
print(ans)
Buggy python submission (verdict: Runtime Error):
S = int(input())
W = int(input())
if W < S:
  print("safe")
else:
  print("unsafe")

Fixed submission:
S, W = input().split()
if int(S) > int(W):
  print("safe")
else:
  print("unsafe")
Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
if a[m] < sum(a) / (4*m):
    print('No')
else:
    print('Yes')

Fixed submission:
n,m = map(int,input().split())
a = list(map(int,input().split()))
a.sort(reverse=True)
if a[m-1] < (sum(a) / (4*m)):
    print('No')
else:
    print('Yes')
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
ans = 0
for i in range(n):
    if min(p[:i+1]) == p[i]:
        ans += 1
print(ans)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
min_p = n+1
ans = 0
for i in range(n):
    if p[i] < min_p:
        ans += 1
        min_p = p[i]
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = list(map(int,input().split()))
a = []
ans = 0
for i in p:
    a.append(i)
    if min(a) == i:
        ans += 1
print(ans)

Fixed submission:
n = int(input())
p = list(map(int,input().split()))
min_p = n+1
ans = 0
for i in range(n):
    if p[i] < min_p:
        ans += 1
        min_p = p[i]
print(ans)
Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort(reverse=True)
if h[-1] > k:
    ans = n
else:
    for i in range(n):
        if h[i] < k:
            ans = i
            break
print(ans)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))
ans = 0
for i in h:
  if i >= k:
    ans += 1
print(ans)

Buggy python submission (verdict: Runtime Error):
n,k = map(int,input().split())
h = list(map(int,input().split()))
h.sort(reverse=True)
if h[-1] > k:
    ans = n
else:
    for i in range(n):
        if h[i] < k:
        	ans = i
        	break
print(ans)

Fixed submission:
n,k = map(int,input().split())
h = list(map(int,input().split()))
ans = 0
for i in h:
  if i >= k:
    ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = []
for i in range(n):
    ai = int(input())
    a.append(ai)
max_a = max(a)
for i in a:
    if i != max_a:
        print(max_a)
    else:
        print(sorted(a)[-2])

Fixed submission:
n = int(input())
max_a = 0
next_a = 0
max_loc = 0
for i in range(n):
    ai = int(input())
    if ai > max_a:
        max_a =ai
        max_loc = i
    elif ai > next_a:
        next_a = ai
if next_a == 0:
    for i in range(n):
        print(max_a)
else:
    for i in range(max_loc):
        print(max_a)
    print(next_a)
    for i in range(n-max_loc-1):
        print(max_a)
Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

import fractions
def min_kou(a):
  ans = a[0]
  for i in range(1, len(a)):
    ans = ans * a[i] // fractions.gcd(ans, a[i])
  return ans

def main():
  N = int(input())
  A = list(map(int, input().split()))
  min_res = min_kou(A)
  ans = 0
  for i in A:
    ans += min_res // i
    if ans >= 1000000007:
      ans -= 1000000007
  print(ans % 1000000007)
  
if __name__ == '__main__':
  main()

Fixed submission:
# -*- coding: utf-8 -*-

import fractions
def min_kou(a):
  ans = a[0]
  for i in range(1, len(a)):
    ans = ans * a[i] // fractions.gcd(ans, a[i])
  return ans

def main():
  N = int(input())
  A = list(map(int, input().split()))
  min_res = min_kou(A)
  ans = 0
  for i in A:
    ans += min_res // i
  print(ans % 1000000007)
  
if __name__ == '__main__':
  main()

Buggy python submission (verdict: Time Limit Exceeded):
# -*- coding: utf-8 -*-

import fractions
def min_kou(a):
  ans = a[0]
  for i in range(1, len(a)):
    ans = ans * a[i] // fractions.gcd(ans, a[i])
  return ans

def main():
  N = int(input())
  A = list(map(int, input().split()))
  min_res = min_kou(A)
  ans = 0
  for i in A:
    ans += min_res // i
  print(ans % 1000000007)
  
if __name__ == '__main__':
  main()

Fixed submission:
# -*- coding: utf-8 -*-

import fractions
def min_kou(a):
  ans = a[0]
  for i in range(1, len(a)):
    ans = ans * a[i] // fractions.gcd(ans, a[i])
  return ans

def main():
  N = int(input())
  A = list(map(int, input().split()))
  min_res = min_kou(A)
  ans = 0
  for i in A:
    ans += min_res // i
  print(ans % 1000000007)
  
if __name__ == '__main__':
  main()
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    rev = 0
    if x > (a*a*b/2):
        #print("lar")
        x = a*a*b - x
        print(90-math.degrees(math.atan(a*a*a/2/x)))
    else:
        print(math.degrees(math.atan(b*b*a/2/x)))

if __name__ == '__main__':
    main()

Fixed submission:
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    rev = 0
    if x == a*a*b:
        print(0)
    elif x > (a*a*b/2):
        #print("lar")
        x = a*a*b - x
        print(90-math.degrees(math.atan(a*a*a/2/x)))
    else:
        print(math.degrees(math.atan(b*b*a/2/x)))

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    rev = 0
    if x > (a*a*b/2):
        #print("lar")
        x = a*a*b - x
        print(90-math.degrees(math.atan(a*a*a/2/x)))
    else:
        print(math.degrees(math.atan(b*b*a/2/x)))

if __name__ == '__main__':
    main()

Fixed submission:
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    rev = 0
    if x == a*a*b:
        print(0)
    elif x > (a*a*b/2):
        #print("lar")
        x = a*a*b - x
        print(90-math.degrees(math.atan(a*a*a/2/x)))
    else:
        print(math.degrees(math.atan(b*b*a/2/x)))

if __name__ == '__main__':
    main()

Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    rev = 0
    if x > (a*a*b/2):
        print("lar")
        x = a*a*b - x
        print(90-math.degrees(math.atan(a*a*a/2/x)))
    else:
        print(math.degrees(math.atan(b*b*a/2/x)))

if __name__ == '__main__':
    main()

Fixed submission:
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    rev = 0
    if x == a*a*b:
        print(0)
    elif x > (a*a*b/2):
        #print("lar")
        x = a*a*b - x
        print(90-math.degrees(math.atan(a*a*a/2/x)))
    else:
        print(math.degrees(math.atan(b*b*a/2/x)))

if __name__ == '__main__':
    main()