Problem:


Score : 400 points

Problem Statement

Takahashi has a water bottle with the shape of a rectangular prism whose base is a square of side a~\mathrm{cm} and whose height is b~\mathrm{cm}. (The thickness of the bottle can be ignored.)

We will pour x~\mathrm{cm}^3 of water into the bottle, and gradually tilt the bottle around one of the sides of the base.

When will the water be spilled? More formally, find the maximum angle in which we can tilt the bottle without spilling any water.

Constraints

All values in input are integers.

1 \leq a \leq 100

1 \leq b \leq 100

1 \leq x \leq a^2b

Input

Input is given from Standard Input in the following format:

a b x

Output

Print the maximum angle in which we can tilt the bottle without spilling any water, in degrees.
Your output will be judged as correct when the absolute or relative error from the judge's output is at most 10^{-6}.

Sample Input 1

2 2 4

Sample Output 1

45.0000000000

This bottle has a cubic shape, and it is half-full. The water gets spilled when we tilt the bottle more than 45 degrees.

Sample Input 2

12 21 10

Sample Output 2

89.7834636934

This bottle is almost empty. When the water gets spilled, the bottle is nearly horizontal.

Sample Input 3

3 1 8

Sample Output 3

4.2363947991

This bottle is almost full. When the water gets spilled, the bottle is still nearly vertical.



Sample input:
2 2 4


Sample output:
45.0000000000

Submission status: Runtime Error

Solution code:
import math

a,b,x=map(int,input().split())
M=x/a
if M<=a*b/2:
    A=M/b*2
    B=b
    C=(A**2+B**2)**0.5
    F=0
else:
    m=a*b-M
    A=a
    B=m/a*2
    C=(A**2+B**2)**0.5
    F=1

def get_angle_from_sides(a, b, c):
    return math.acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b))

def checkio(a, b, c):
    try:
        angles = [get_angle_from_sides(*abc) for abc in ((a, b, c), (b, c, a), (c, a, b))]
        result = sorted(math.degrees(a) for a in angles)
        return angles if 0 in result else result
    except ValueError:
        return [0, 90, 0]

if F==0:
    print(checkio(A,B,C)[1])
else:
    print(checkio(A,B,C)[0])

Submission status: Runtime Error

Solution code:
a,b,x = list(map(int,input().split()))

if x*2 > b:
    import math

    y = 0
    y = 2*x/(a**2)-b

    print(90-math.degrees(math.atan(a/(y-b))))
else:
    import math

    y = 0
    y = 2*x/(a*b)

    print(90-math.degrees(math.atan(y/b)))

Submission status: Runtime Error

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

S = a*b
I = x/a

if I > S/2:
  print(math.degrees(math.atan(2*(S-I)/a**2)))
else:
  print(90-math.degrees(math.atan(2*I/b**2)))

Submission status: Runtime Error

Solution code:
import math

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

x2 = x/a
c = x2*2/a - b
ans=math.atan(a/(b-c))
ans = 90 - ans / math.pi * 180
if c <= 0:
    c = x2*2 / b
    ans=math.atan(c/b)
    ans = 90 - ans / math.pi * 180


print(ans)

Submission status: Runtime Error

Solution code:
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

if 2*x>=Volume:
    print("..")
    print(const.convToDEG*math.atan(2*(a*a*b-x)/a**3))

else:
    h=2*x/(a*b)
    print(const.convToDEG*math.acos(h/b))

Submission status: Runtime Error

Solution code:
import math
a,b,V=map(int,input().split())
math.degrees(math.atan(1))
s=(a**3/(2*(a**2*b-V)))
ans=math.degrees(math.atan(s))
print(90-ans)

Submission status: Runtime Error

Solution code:
import math
a, b, x = tuple(map(int, input().split(' ')))
area = x / a
y = area * 2 / b
theta = 90 - math.degrees(math.atan(y / b))
if a < y:
    area = a * b - area
    y = area * 2 / a
    theta = 90 - math.degrees(math.atan(a / y))

print(theta)

Submission status: Runtime Error

Solution code:
a,b,x = map(int, input().split())
c = b-x*2/a/a-b
print(math.degrees(math.atan(b/c)))

Submission status: Runtime Error

Solution code:
from math import asin, atan, pi

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

if x == a * a * b:
  print(0)
elif x >= a * a * b / 2:
  print(atan((a*a*b-x)/(a*a*a)*2)/(2 * pi)*360)
else:
  print(90 - asin(x/(a*b/2))/(2 * pi)*360)

Submission status: Runtime Error

Solution code:
import math

class _const:
    def __init__(self):
        self.PI=math.acos(-1)
        self.convToDEG=180/self.PI
const=_const()


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

Volume=a*a*b

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

else:
    print("..")
    h=2*x/(a*b)
    print(const.convToDEG*math.acos(h/b))

Submission status: Runtime Error

Solution code:
import math

a,b,x=map(int,input().split())
M=x/a
if M<=a*b/2:
    A=M/b*2
    B=b
    C=(A**2+B**2)**0.5
    F=0
else:
    m=a*b-M
    A=a
    B=m/a*2
    C=(A**2+B**2)**0.5
    F=1

def get_angle_from_sides(a, b, c):
    return math.acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b))

def checkio(a, b, c):
    angles = [get_angle_from_sides(*abc) for abc in ((a, b, c), (b, c, a), (c, a, b))]
    result = sorted(math.degrees(a) for a in angles)
    return result
    

if F==0:
    print(checkio(A,B,C)[1])
else:
    print(checkio(A,B,C)[0])

Submission status: Runtime Error

Solution code:
import math
from scipy import optimize

def f1(sita,b,x):
    return b**2/8*math.sin(sita)*(3-math.cos(sita))-x


def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ts=b**2/(xx)/2
        print(math.degrees(ans[0]))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        
if __name__ == "__main__":
    resolve()

Submission status: Runtime Error

Solution code:
import numpy as np

z = input().split()

a = int(z[0])
b = int(z[1])
x = int(z[2])

if (x < 1/2 * a**2 * b):
    child = 1
    mother = np.sqrt((2*x / (a * b**2))**2 + 1)
    arcc = np.arccos(child / mother)
    answer = 90 - np.rad2deg(arcc)
else:
    child = 1
    mother = np.sqrt((a**3/(2 * b * a**2 - 2 * x))**2 + 1)
    arcc = np.arccos(child / mother)
    answer = 90 - np.rad2deg(arcc)
print("{}".format(answer))

Submission status: Runtime Error

Solution code:
import math
 
a,b,x=map(int,input().split())


y=2*x/(a*b)
if(y<=a):
    arg=math.asin(b/math.sqrt(y**2+b**2))
    deg=math.degrees(arg)

else:
    y=x/a**2
    arg=math.atan(a/(b-y))
    deg=math.degrees(arg)
print(deg)

Submission status: Runtime Error

Solution code:
from math import asin, atan, pi

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

if x == a * a * b:
  print(0)
if x >= a * a * b / 2:
  print(atan((a*a*b-x)/(a*a*a)*2)/(2 * pi)*360)
else:
  print(90 - asin(x/(a*b/2))/(2 * pi)*360)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import math
a, b, x = map(int, input().split())

theta = math.atan(a*a*a/(2*a*a*b-2*x))
theta2 = math.atan(2*x/(a*b*b))


if a < math.tan(theta)*b:
    result = 90 - math.degrees(theta)
else:
    result = 90 - math.degrees(theta2)
print(result)

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
 
h = x / (a * a) #height 
if h > b / 2:
  shahen = 4 * (b - x/(a * a) * (b - x/(a * a))) + a * a
  sin = a / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))
elif h == b / 2:
  print(45.0000000000)
else:
  shahen = 4 * x * x + a * a * b * b * b * b
  sin = 2 * x / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))

Submission status: Runtime Error

Solution code:
import math

a,b,x=map(int,input().split())
M=x/a
if M<=a*b/2:
    A=M/b*2
    B=b
    C=(A**2+B**2)**0.5
    F=0
else:
    m=a*b-M
    A=a
    B=m/a*2
    C=(A**2+B**2)**0.5
    F=1

def get_angle_from_sides(a, b, c):
    return math.acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b))

def checkio(a, b, c):
    try:
        angles = [get_angle_from_sides(*abc) for abc in ((a, b, c), (b, c, a), (c, a, b))]
        result = sorted(math.degrees(a) for a in angles)
        return angles if 0 in result else result
    except ValueError:
        return [0, 0, 0]

if F==0:
    print(checkio(A,B,C)[1])
else:
    print(checkio(A,B,C)[0])

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
 
h = x / (a * a) #height 
if h > b / 2:
  shahen = 4 * (b - x/(a * a) * (b - x/(a * a))) + a * a
  sin = a / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))
elif h == b / 2:
  print(45.0000000000)
else:
  shahen = 4 * x * x + a * a * b * b * b * b
  sin = 2 * x / (math.sqrt(shahen))
  print(sin)
  print(90 - math.degrees(math.asin(sin)))

Submission status: Runtime Error

Solution code:
from math import atan, degrees
a, b, x = map(int, input().split())

#ans = max(90 - degrees(atan(0.5 * a ** 3/(a ** 2 * b - x))), 90 - degrees(atan(2 * x / (a * b ** 2))))
if 0.5 * a ** 2 * b < x:
    ans = 90 - degrees(atan(0.5 * a ** 3/(a ** 2 * b - x)))
else:
    ans = 90 - degrees(atan(2 * x / (a * b ** 2)))
print(ans)

Submission status: Runtime Error

Solution code:
import math
a,b,V=map(int,input().split())
math.degrees(math.atan(1))
s=(a**3/(2*(a**2*b-V)))
ans=math.degrees(math.atan(s))
print(ans)

Submission status: Runtime Error

Solution code:
from math import asin, atan, pi

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

if x >= a * a * b / 2:
  print(atan((a*a*b-x)/(a*a*a)*2)/(2 * pi)*360)
else:
  print(90 - asin(x/(a*b*b/2))/(2 * pi)*360)

Submission status: Runtime Error

Solution code:
import math

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

x2 = x/a
c = x2*2/a - b
ans=math.atan(a/(b-c))
ans = 90 - ans / math.pi * 180
if c < 0:
    c = x2*2 / b
    ans=math.atan(c/b)
    ans = 90 - ans / math.pi * 180


print(ans)

Submission status: Runtime Error

Solution code:
# -*- 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()

Submission status: Runtime Error

Solution code:
import math
a, b, c = map(int, input().split())

# 容器に入っている水が半分以下の場合に困る
if a**2*b > 2 * c:
    h = (2*c)/(a**2)
    print(math.degrees(math.acos(h/a)))
else:
    h = 2*(a**2*b-c)/(a**2)
    print(math.degrees(math.atan(h/a)))

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())
v = a **2 * b
h = 0
ans = 0
if v == x:
    ans = 0
if(x > v // 2):
    ans = 90 - math.degrees(math.atan(a ** 3 / ( 2 * (v - x))))
else:
    ans = 90 - math.degrees(math.atan(x / (a * b **2 // 2)))
print(ans)

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())

V = (a ** 2) * b

if x <= V / 2:
  t = 2 * x / (a * (b ** 2))
elif x > V / 2:
  t = (a ** 3) / (2 * (V - x))
  
def f(x):
  return math.tan(x) - t
def g(x):
  return math.tan(x) - 1 / t
if t < 1:
  S = math.pi / 4
  for i in range(100):
    S = S - f(S) * (math.cos(S) ** 2)
  print(90 - 180 * S / math.pi)
else:
  S = math.pi / 4
  for i in range(100):
    S = S - g(S) * (math.cos(S) ** 2)
  print(180 * S / math.pi)

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())
v = a **2 * b
h = 0
ans = 0
if(x > v // 2):
    ans = 90 - math.degrees(math.atan(a ** 3 / ( 2 * (v - x))))
else:
    ans = 90 - math.degrees(math.atan(x / (a * b **2 // 2)))
print(ans)

Submission status: Runtime Error

Solution code:
A,B,X=map(int, input().split())
C=2*X/(A*B)
if C<=A:
    math.atan(B/C)*(180)/math.pi
    C=2*X/(A*B)
    print(math.atan(B/C)*(180)/math.pi)
else:
    C=2*Y/(A*A)
    Y=A*A*B-X
    C=2*Y/(A*A)
    print(math.atan(C/A)*(180)/math.pi)

Submission status: Runtime Error

Solution code:
# -*- 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()

Submission status: Runtime Error

Solution code:
import math
a,b,V=map(int,input().split())
math.degrees(math.atan(1))
s=round((a**3/(2*(a**2*b-V))),5)
ans=math.degrees(math.atan(s))
print(ans)

Submission status: Runtime Error

Solution code:
import math

a, b, x = (int(_) for _ in input().split())

aab  = b * (a**2)
y    = aab-x

if aab/2 <= x:
    tan0 = y / (a**3)
    tan0 = tan0 * 2
    print(math.degrees(math.atan(tan0)))
else:
    tan0 = x / a
    tan0 = (tan0 * 4)/(b**2)
    print(90-math.degrees(math.asin(tan0))/2)

Submission status: Runtime Error

Solution code:
a,b,x=input().split()
a=float(a)
b=float(b)
x=float(x)

s=a*b^2

if x <= s/2:
    ans = math.degree(math.atan(2*x/(a*b*b)))
    print(ans)
else:
    ans = math.degree(math.atan(a^3/(2*(a^2*b-x))))
    print(ans)

Submission status: Runtime Error

Solution code:
import math
a,b,x=map(int,input().split())
x=x/a
d=(3*x)/b
X=x/3

if b<=x:
  atan1 = math.degrees(math.atan(a/(2*b-(2*x)/a)))
else:
  atan1 = math.degrees(math.atan(d/b))
                       
print(90-atan1)

Submission status: Runtime Error

Solution code:
import math

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

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

else:
    p = (2 * x) / (a * b)
    print(90 - math.degrees(math.atan(p / b)))

Submission status: Runtime Error

Solution code:
import math

a,b,x = map(int,input().split())
h = a*a*b/2

if h >= x:
    c = 2*x/(a*b)
    ans = math.degrees(math.atan((a*a*b)/(2*x)))

else:
    c = (x - a*a*b/2)*(2/(a*a))
    ans = 90 - math.degrees(math.atan(a/(b-c)))

print(ans)

Submission status: Runtime Error

Solution code:
import math
a,b,x = input().split()
a,b,x = int(a),int(b),int(x)


if(x<=(a*a*b)/2):
    S = x/a
    h = (2*S/b)
    print(90.-math.atan(h/b)/(2.*math.pi)*360)
else:
    x /= a
    d = 2*x/a-b
    print(90.-math.atan(a/(b-d))*360/(2*math.pi))

Submission status: Runtime Error

Solution code:
a,b,x=float(input().split())

s=a*b^2

if x <= s/2:
    ans = math.degree(math.atan(2*x/(a*b*b)))
    print(ans)
else:
    ans = math.degree(math.atan(a^3/(2*(a^2*b-x))))
    print(ans)

Submission status: Runtime Error

Solution code:
from math import atan, degrees
a, b, x = map(int, input().split())

ans = max(90 - degrees(atan(0.5 * a ** 3/(a ** 2 * b - x))), 90 - degrees(atan(2 * x / (a * b ** 2))))
print(ans)

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
 
h = x / (a * a) #height 
if h > b / 2:
  print("ooi")
  shahen = 4 * (b - x/(a * a) * (b - x/(a * a))) + a * a
  sin = a / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))
elif h == b / 2:
  print(45.0000000000)
else:
  print("sukunai")
  shahen = 4 * x * x + (a * a * a * a) * b * b
  sin = 2 * x / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))

Submission status: Runtime Error

Solution code:
import math
i = list(map(int, input().split()))
a=i[0]
b=i[1]
x=i[2]
if(x / a < a * b / 2):
	print(math.degrees(math.acos(x / a * 2 / b / b)))
else:
	print(math.degrees(math.atan((a*b-x/a)*2/a/a)))

Submission status: Runtime Error

Solution code:
import math

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

y = b - (x / a**2)
z = (4 * y**2 + a**2)**0.5

cos = (a**2 - 4*y**2 - z**2) / (-4 * y * z)

theta = math.degrees(math.acos(cos))

print('{:.10f}'.format(90 - theta))

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
i = a**3
j = 2*(a*a*b-x)
tan1 = i/j
deg = math.degrees(math.atan(tan1))
if deg < 45:
    tan2 = 2*x / (a*b*b)
    deg = math.degrees(math.atan(tan2))

print(90-deg)

Submission status: Runtime Error

Solution code:
a,b,x=double(input().split())

s=a*b^2

if x <= s/2:
    ans = math.degree(math.atan(2*x/(a*b*b)))
    print(ans)
else:
    ans = math.degree(math.atan(a^3/(2*(a^2*b-x))))
    print(ans)

Submission status: Runtime Error

Solution code:
import math
a,b,x = [int(i) for i in input().split()]

if x <= (a**2*b)/2:
    height = x/(a*b)*2
    #余弦定理
    c = b**2 + height**2 - 2*b*height*math.cos(math.radians(90))
    h2 = b*height / math.sqrt(c)
    theta = math.degrees(math.asin(h2/height))
    print(theta)
else:
    square = a**2*b-(a**2*b - x)*2
    triangle = (a**2*b-x)
    ratio = square/triangle/2 + 1
    d = b/ratio
    height = triangle/(a*d)*2
    c = d**2 + height**2 - 2*d*height*math.cos(math.radians(90))
    h2 = d*height / math.sqrt(c)
    theta = math.degrees(math.asin(h2/height))
    print(theta)

Submission status: Runtime Error

Solution code:
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    # print(90-math.degrees(math.atan(   (a/(b-y))  )))
    print(90-math.degrees(math.atan2(a, b-y)))
else:
    # 三角形
    # print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))
    print(90-math.degrees(math.atan2(2*x/(a*b),

Submission status: Runtime Error

Solution code:
a,b,x=double(input())

s=a*b^2

if x <= s/2:
    ans = math.degree(math.atan(2*x/(a*b*b)))
    print(ans)
else:
    ans = math.degree(math.atan(a^3/(2*(a^2*b-x))))
    print(ans)

Submission status: Runtime Error

Solution code:
import sys
import numpy as np
import math

def main():
    input = sys.stdin.readline
    abx = list(map(int, input().split()))
    a = abx[0]
    b = abx[1]
    x = abx[2]
    taiseki = a * a * b
    if x <= taiseki / 2:
        y = (2 * x) / (a * b)
        tan = y / b
        theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))
    else:
        y = (2 * x) / (a * a) - b
        tan = a / (b - y)
        theta = np.float64(np.float64(90) - np.rad2deg(np.arctan(tan)))

    print(theta)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math

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

b_1 = x / (a ** 2)
area_1 = a * b_1
area_2 = (a * b) / 2

if area_2 > area_1:
    # 三角形
    h = (a * b_1 * 2) / b
    ans = math.degrees(math.atan(h / b))
else:
    # 梯形
    upside_len = b_1 * 2 - b
    ans = math.degrees(math.atan(a / (b - upside_len)))

print(90 - ans)

Submission status: Runtime Error

Solution code:
a,b,x=double(input())

s=a*b^2

if x <= s/2:
    ans = math.degree(math.atan(2*x/(a*b*b)))
    print(ans)
else:
    ans = math.degree(math.atan(a^3/(2*(a^2*b-x)))
    print(ans)

Submission status: Runtime Error

Solution code:
from math import atan, pi
a,b,x = [int(i) for i in input().split()]




ocupado = x/(a*a)

if ocupado*2 >= b:
    sobra = b - ocupado

    #alfa = atan(sobra/ocupado)
    alfa = atan(a / (2*(b-ocupado)))
else:
    alfa = atan((2*a*ocupado) / (b*b))
print("%.10f" %(90 - alfa*180/pi))

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(float, input().split())
_x = x / a
if _x <= a * b / 2.0:
    theta = math.atan(_x * 2.0 / b / b)
    print(90.0 - math.degrees(theta))
else:
    _x = a * b - _x
    theta = math.atan(a * a / 2.0 / _x)
    print(90.0 - math.degrees(theta))

Submission status: Runtime Error

Solution code:
import sys
import numpy as np

def main():
    input = sys.stdin.readline
    abx = list(map(int, input().split()))
    a = abx[0]
    b = abx[1]
    x = abx[2]
    taiseki = a * a * b
    if x <= taiseki / 2:
        y = (2 * x) / (a * b)
        tan = y / b
        theta = 90 - np.rad2deg(np.arctan(tan))
    else:
        y = (2 * x) / (a * a) - b
        tan = a / (b - y)
        theta = 90 - np.rad2deg(np.arctan(tan))

    print(theta)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
 
h = x / (a * a) #height 
if h > b / 2:
  shahen = 4 * (b - x/(a * a) * (b - x/(a * a))) + a * a
  sin = a / (math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))
elif h == b / 2:
  print(45.0000000000)
else:
  shahen = 4 * a * a * x * x + b * b
  sin = x / (a * math.sqrt(shahen))
  print(90 - math.degrees(math.asin(sin)))

Submission status: Runtime Error

Solution code:
import math
a,b,x=map(int,input().split())
x_2d = x/a
if x/a > (a*b)/2:
    print(90-math.degrees(math.atan(a/(2*b-2*x/(a*a)))))
else:
    print(math.degrees(math.atan(b/(2*x/(a*b)))))

Submission status: Runtime Error

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''

'''
.append(要素)
.extend(要素)
.insert(場所,要素)
del 配列名[場所]
-1で末尾で末尾から一つ前
'''
'''
間に空白追加
' '.join(lis)
'''
'''
copy.copy(配列名)
'''
'''
sort()50
sorted(reverse=true)
'''
'''
2分探索
bisect.bisect_left(リスト, 要素)
'''
data = stdin.readline().rstrip().split()
a = float(data[0])
b = float(data[1])
x = float(data[2])
if (b * a * a >= 2 * x):
    print(90.0 - math.degrees(math.atan(2 * x / (a * b * b))))
else:
    print(90.0 - math.degrees(math.atan(a*a*a/(2 * a*a*b-2 * x))))

Submission status: Runtime Error

Solution code:
import math
a, b, x = list(map(float, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    print(90-math.degrees(math.atan(   (a/(b-y))  )))
else:
    # 三角形
    print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))

Submission status: Runtime Error

Solution code:
import math
a,b,x=map(int,input().split())
x_2d = x/a
print(x_2d)
if x/a > (a*b)/2:
    print(90-math.degrees(math.atan(a/(2*b-2*x/(a*a)))))
else:
    print(math.degrees(math.atan(b/(2*x/(a*b)))))

Submission status: Runtime Error

Solution code:
import math
a, b, x = [int(x) for x in input().split()]
y = 2 * (b - (x / (a * a)))
if y <= b:
    value = a / y
    print(90 - math.degrees(math.atan(value)))
else:
    y = (2 * x) / (a * b)
    v = b / y
    print(math.degrees(math.atan(v)))

Submission status: Runtime Error

Solution code:
import sys
import math

def main():
    input = sys.stdin.readline
    abx = list(map(int, input().split()))
    a = abx[0]
    b = abx[1]
    x = abx[2]
    taiseki = a * a * b
    if x <= taiseki / 2:
        y = (2 * x) / (a * b)
        tan = y / b
        theta = 90 - math.degrees(math.atan(tan))
    else:
        y = (2 * x) / (a * a) - b
        tan = a / (b - y)
        theta = 90 - math.degrees(math.atan(tan))

    print(theta)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
a, b, x = list(map(int, input().split()))

# %%
# a, b, x = [3, 1, 8]
if x/a > a*b/2:
    # 台形
    y = 2*x/(a**2) - b
    print(90-math.degrees(math.atan(   (a/(b-y))  )))
else:
    # 三角形
    print(90-math.degrees(math.atan( (2*x/(a*b)) / b  )))

Submission status: Runtime Error

Solution code:
import math
a,b,x=map(int,input().split())
c=b/2
if x<=a*a*c:
    d=2*x/b/a
    print(round(math.degrees(math.atan(b/d)),10))
else:
    x=a*a*b-x
    d=2*x/a/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
import math
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(a: int, b: int, x: int):
    y = float(x)/float(a)
    ans = .0
    if (a**2 * b - x) == 0:
        ans = 90.0
    if y >= a*b/2:
        bd = 2.0*(a*b-y)/a
        ans = 90.0-math.degrees(math.atan(a/bd))
    else:
        ad = 2.0*y/b
        ans = 90.0-math.degrees(math.atan(ad/b))

    print(ans)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    solve(a, b, x)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
from scipy import optimize


def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ans = 90-optimize.fsolve(f1,math.pi/4,args=(b,xx),epsfcn=10**-18)
        print(math.degrees(ans[0]))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        
if __name__ == "__main__":
    resolve()

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
import math
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(a: int, b: int, x: int):
    y = float(x)/float(a)
    ans = .0
    if (a**2 * b - x) == 0:
        ans = 90.0
    if y >= a*b//2:
        bd = 2.0*(a*b-y)/a
        ans = 90.0-math.degrees(math.atan(a/bd))
    else:
        ad = 2.0*y/b
        ans = 90.0-math.degrees(math.atan(ad/b))

    print(ans)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    solve(a, b, x)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
if x >= (0.5 * a**2 * b):
    z = (math.atan(a**3/(2*(a**2*b - x))))
    print(90 - math.degrees(z))
else:
    z = (math.atan(2*x/(a * b**2)))
    print(90 - math.degrees(z))

Submission status: Runtime Error

Solution code:
import numpy as np
a,b,x=map(int,input().split())

V=a**2*b
if x<=V/2:
    alpha=np.arctan(2*x/a/b**2)
    angle=90-alpha/np.pi*180
    print('{:.10f}'.format(angle))
else:
    angle=90-np.arctan(a**3/2/(a**2*b-x))/np.pi*180
    print('{:.10f}'.format(angle))

Submission status: Runtime Error

Solution code:
import math

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

y = b - (x / a**2)
z = (4 * y**2 + a**2)**0.5

cos = (a**2 - 4*y**2 - z**2) / (-4 * y * z)

theta = math.degrees(math.acos(cos))

print(90 - theta)

Submission status: Runtime Error

Solution code:
import math
a,b,x=map(int,input().split())
x=x/a
c=b/2
if x<=a*c:
    d=2*x/b
    print(round(math.degrees(math.atan(b/d)),10))
else:
    x=a*b-x
    d=2*x/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
h = x/(a*a)

import math

def f1(d,H,h):
    if h >= H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))

Submission status: Runtime Error

Solution code:
import math
words = lambda t : list(map(t, input().split()))
a,b,x = words(int)

k = x / (a*a)
if k*2 == b:
    print(45)
elif k*2 < b:
    print(90 - math.degrees(math.atan(2*x/(a*b*b))))
else:
    p = ((a*b)- (x/a)) / (a/2)
    print(90 - math.degrees(math.atan(a/p)))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
import sys
import math
sys.setrecursionlimit(10000)
INF = 1<<32


def solve(a: int, b: int, x: int):
    y = float(x)/float(a)
    ans = .0
    if y >= a*b//2:
        bd = 2.0*(a*b-y)/a
        ans = 90.0-math.degrees(math.atan(a/bd))
    else:
        ad = 2.0*y/b
        ans = 90.0-math.degrees(math.atan(ad/b))

    print(ans)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    solve(a, b, x)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math
words = lambda t : list(map(t, input().split()))
a,b,x = words(int)

k = x / (a*a)
print(k)
if k*2 == b:
    print(45)
elif k*2 < b:
    print(90 - math.degrees(math.atan(2*x/(a*b*b))))
else:
    p = ((a*b)- (x/a)) / (a/2)
    print(90 - math.degrees(math.atan(a/p)))

Submission status: Runtime Error

Solution code:
input = str(input()).split(" ")
input = [int(x) for x in input]

a=input[0]
b=input[1]
x=input[2]

import math

##check situation
height = x/a/a
if height <= b/2:
    teihen_height = 2*x/a/b
    print(math.degrees(math.atan(b/teihen_height)))
else:
    nokori_height = b - height
    print(90-math.degrees(math.atan(0.5*a/nokori_height)))

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())

if x >= a*a*b/2:
    y = (-1)*b + 2*x/(a**2)
    if b != y:
        d = math.atan(a / (b-y))
    else:
        print(0)
        #exit()
else:
    y = 2*x/(a*b)
    d = math.atan(y/b)
print(90 - math.degrees(d))

Submission status: Runtime Error

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
import heapq
n,k=map(int,input().split())
a=list(map(int,input().split()))
f=list(map(int,input().split()))
a.sort()
f.sort()
ans=[]
for i in range(n):
    ans.append([f[i]*a[n-i-1]*-1,a[n-i-1]*-1])
heapq.heapify(ans)
# print(ans)
for i in range(k):
    tmp=heapq.heappop(ans)
    # print(tmp)
    if tmp[1]==0:
        heapq.heappush(ans,tmp)
        break
    tmp[0]=tmp[0]//tmp[1]
    tmp[1]+=1
    tmp[0]=tmp[0]*tmp[1]
    heapq.heappush(ans,tmp)
cnt=0
for i in range(n):
    cnt=max(cnt,ans[i][0]*-1)
print(cnt)

Submission status: Runtime Error

Solution code:
import sys
import math
input = sys.stdin.readline
a, b, x = [int(x) for x in input().strip().split()]
if x >= a ** 2 * b / 2:
    theta = math.degrees(math.atan(2 * (a ** 2 * b - x) / (a ** 3)))
else:
    theta = math.degrees(math.atan(a * (b ** 2) / (2 * x)))
print(theta)s

Submission status: Runtime Error

Solution code:
import math 

arr = input().split()
a = int(arr[0])
b = int(arr[1])
x = int(arr[2])
if b*a*a >= x:
    ans1 = 90-math.atan(a*a*a/(2.0*(b*a*a-x)))/math.acos(-1)*180
else:
    ans1 =0
ans2 = math.atan(a*b*b/2/x)/math.acos(-1)*180

if ans1 <= 45.0:
    print (ans1)
else:
    print (ans2)

Submission status: Runtime Error

Solution code:
#include <iostream> // cin, cout, cerr
#include <algorithm> // minmax, sort, swap
#include <numeric> // iota
#include <cstdio> // printf, scanf
#include <string> // string, stoi, to_string
#include <vector> // vector
#include <queue> // queue, priority_queue
#include <deque> // deque
#include <map> // key-value pairs sorted by keys
#include <set> // set
#include <iomanip> // cout<<setprecision(n)
#include <functional> // function<void(int)>
#include <climits> // INT_MIN, LLONG_MIN
#include <cmath> // float operations
#include <stack> // stack
#include <unordered_map> // hashed by keys
#include <unordered_set> // hashed by keys
#include <regex> // regular expressions

#define rep(i,n) for(int i = 0; i < (n); i++)
#define ENDL '\n'
#define print(i) std::cout << (i) << std::setprecision(10) << '\n'

#define int long long // at least int64 > 9*10^18
#define all(v) (v).begin(), (v).end()
#define ld long double
/* libraries */

signed main() {
	ld a,b,x;
	std::cin >> a >> b >> x;
	ld s = x/a;
	ld fix = 180;
	fix/=M_PI;
	ld c = (ld)2*s/b;
	if(c<=a) print(std::atanl(b/c)*fix);
	else {
		ld d = (ld)2*s/a-b;
		print(std::atanl((b-d)/a)*fix);
	}
	return 0;
}

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
h = x/(a*a)

import math

def f1(d,H,h):
    if h > H/2:
        return math.degrees(math.atan(d/(2*(H-h))))
    else:
        return math.degrees(math.atan((2*d*h)/(H*H)))

print(str.format('{0:.10f}', 90 - f1(a,b,h)))