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: Wrong Answer

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    a, b, x = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]

    import math
    import bisect
    #台形の場合
    if 2*x / (a**2) >= b:
        Down = [(x/(a**2) + a * math.tan(math.pi * i /(2* 9*10**6)) /2) for i in range(9*10**6)]
        ind = bisect.bisect_left(Down, b)

    # 三角形の場合
    else:
        Down = [math.sqrt(2*x /a * math.tan(math.pi * i /(2* 9*10**6))) for i in range(9*10**6)]
        ind = bisect.bisect_left(Down, b)

    print(float(ind/1000))
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
    import sys
    input = sys.stdin.readline
    # 整数 1 つ
    # n = int(input())
    # 整数複数個
    a, b, x = map(int, input().split())
    # 整数 N 個 (改行区切り)
    # N = [int(input()) for i in range(N)]
    # 整数 N 個 (スペース区切り)
    # N = list(map(int, input().split()))
    # 整数 (縦 H 横 W の行列)
    # A = [list(map(int, input().split())) for i in range(H)]


    import math
    import bisect
    #台形の場合
    if 2*x / (a**2) >= b:
        Down = [(x/(a**2) + a * math.tan(math.pi * i /(2* 9*10**5)) /2) for i in range(9*10**5)]
        ind = bisect.bisect_left(Down, b)

    # 三角形の場合
    else:
        Down = [math.sqrt(2*x /a * math.tan(math.pi * i /(2* 9*10**5))) for i in range(9*10**5)]
        ind = bisect.bisect_left(Down, b)

    print(float(ind/1000))


resolve()

Submission status: Wrong Answer

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

ans = np.rad2deg(np.arctan2(2 * (b - x/a**2), a))
print('{:.10f}'.format(ans))

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
c=b-(x/(a*a))
k=math.sqrt(c**2+(a*a/4))
print(math.degrees(math.acos(a/(2*k))))

Submission status: Wrong Answer

Solution code:
def main():
    import numpy as np
    a, b, x = map(int, input().split())
    if b <= a:
        theta = np.arctan(2 * (b / a - x / a ** 3)) / np.pi * 180
        print(theta)
    else:
        theta = np.arctan(a * b ** 2 / 2 / x) / np.pi * 180
        print(theta)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    import numpy as np
    a, b, x = map(int, input().split())
    if b < a:
        theta = np.arctan(2 * (b / a - x / a ** 3)) / np.pi * 180
        print(theta)
    else:
        theta = np.arctan(a * b ** 2 / 2 / x) / np.pi * 180
        print(theta)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int, input().split())
if x <= b / 2:
    print(math.degrees(math.atan(a * b * b / (2 * x))))
else:
    print(math.degrees(math.atan(2 * b / a - 2 * x / (a**3))))

# a*a*b' = x
# b' = x/(a*a)
# c*b/2*a = x
# c=2x/ab
# arctanΘ=b/c=b/(2x/ab)=ab^2/2x

# (d+b)*a/2*a=x
# a^2(b+d) = 2x
# d=2x/a^2 - b
# arctanΘ=(b-d)/a=(b-2x/a^2+b)/a=2b/a-2x/(a^3)

Submission status: Wrong Answer

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

ans = 0

sw = 2*x - a**3
sw_c = abs(math.atan(sw))

ans = abs(math.atan(2/a*(b-x/(a**2))))
ans_1 = abs(math.atan(a*b**2/(2*x)))

if(ans < sw_c):
    print(math.degrees(ans))
else:
    print(math.degrees(ans_1))

#print(math.degrees(ans))
#print(sw_c)

Submission status: Wrong Answer

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

ans = 0

sw = 2*x - a**3
sw_c = math.atan(sw)

ans = math.atan(2/a*(b-x/(a**2)))
ans_1 = math.atan(a*b**2/(2*x))

if(abs(ans) < abs(sw_c)):
    print(math.degrees(ans))
else:
    print(math.degrees(ans_1))

#print(math.degrees(ans))
#print(sw_c)

Submission status: Wrong Answer

Solution code:
import math

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

ans = a * (b**2) / (2 * x)
e = 90
s = 0
while e - s > 10**(-8):
    m = (e + s) / 2
    z = math.tan(math.radians(m))
    if z == ans:
        s = m
        break
    elif z > ans:
        e = m
    else:
        s = m
print(s)

Submission status: Wrong Answer

Solution code:
from math import atan, radians, degrees

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

if 2*h >= b:
    ans = degrees(atan((2*b-2*h)/a))
    print(ans)

elif 2*he >= a:
    ans = degrees(atan(b**2/(2*h*a)))
    print(ans)

else:
    print(float(90))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import atan, degrees
a,b,x = map(int,input().split())
s = x / (a*a)
o = 2 * s - b
if o < 0:
    h = 2 * s / b
    print(degrees(atan(b/h)))
else:
    print(degrees(atan((b-o)/a)))

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

def solve():
    import math

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

    if x > a*a*b/2:
        h1 = (((a*a*b)-x)*2)/(a*a)
        h2 = (a**2+h1**2)**(1/2)  # 3平方の定理

        # (a*a*b)-x = (1/2)*a*h2*math.sin(theta)*a
        theta = math.asin( (((a*a*b)-x)*2)/(a*a*h2) )
        print(math.degrees(theta))
    else:
        h1 = (x*2)/(b*b)
        h2 = (b**2+h1**2)**(1/2)

        # x = (1/2)*b*h2*math.sin(theta)*a
        theta = math.asin( (x*2)/(b*h2*a) )
        ans = 180 - math.degrees(theta) - 90
        print(ans)


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

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

dig = (1 - ((x / (a * a)) / b)) * 90
print(dig)

Submission status: Wrong Answer

Solution code:

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

a_ = 2 * x / a / b

import math

print(a_, a, b, x)

if a_ < a:
    ang = math.degrees(math.atan(b / a_))
    print(ang)
else:
    b_ = 2 * ((a**2) * b - x) / (a**2)
    ang = math.degrees(math.atan(b_ / a))
    print(ang)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A,B,X=map(int,input().split())

space=A*A*B-X

less=False
if space>A*A*B/2:
  less=True
  space=A*A*B-space

h=space/(A*A)*2
import math
print(math.degrees(math.atan(h/A))if less==False else 90-math.degrees(math.atan(h/A)))

Submission status: Wrong Answer

Solution code:
A,B,X=map(int,input().split())

space=A*A*B-X
h=space/(A*A)*2
import math
print(math.degrees(math.atan(h/A)))

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
import math

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

if 2*x <= a*a*b:
  y = 2 * x / (a * b)
  print(math.degrees(math.atan(y/b)))
else:
  y = 2 * x / (a * a)
  print(math.degrees(math.atan(a/y)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a,b,x = map(int,input().split())
ku = math.atan(2*(b/a)-2*x/a**3)
kuku = math.degrees(ku)
if kuku <= 45:
  print(kuku)
else:
  print(math.degrees(math.atan(a*b**2/(2*x))))

Submission status: Wrong Answer

Solution code:
import math
a,b,x = map(int,input().split())
ku = math.atan(2*(a/b)-2*x/a**3)
kuku = math.degrees(ku)
if kuku <= 45:
  print(kuku)
else:
  print(math.degrees(math.atan(a*b**2/(2*x))))

Submission status: Wrong Answer

Solution code:
import math

a, b, x = [int(n) for n in input().split()]

print((180 / math.pi) * (math.atan2(a*b**2, 2*x)))

Submission status: Wrong Answer

Solution code:
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

import math
import numpy as np
a,b,x = mi()

l,r = 0,90

print('aa',a*a*b)
for i in range(100):

    c = (r+l)/2
    cr = np.deg2rad(c)

    if b*np.sin(np.pi/2 - cr) >= a*np.sin(cr):
        capa = a*a /np.cos(cr)*np.sin(cr)/2 + a/np.cos(cr) * (b*np.sin(np.pi/2 - cr) - a*np.sin(cr))
        capa *= a
    else:
        capa = b*b/2/np.tan(cr) * a

    
    # print(r,l,c)
    # print(capa)
    # print('------')

    if capa <= x:
        r = c
    else:
        l = c

print(l)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# 空いている空間の体積
emp = a*a*b - x
# 空いた空間の三角柱の辺のうち、傾けて長さが変動する一辺の長さ
t_length = (emp * 2) / (a*a)

# 水が入った部分が三角柱型になる時は上の処理、空いた空間が三角柱型であるうちは下の処理、
if t_length >= b:
    print(90 - math.degrees(math.atan2((x*2) / (a*a), b)))
else:
    print(math.degrees(math.atan2(t_length, a)))

Submission status: Wrong Answer

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

# 空いている空間の体積
emp = a*a*b - x
# 空いた空間の三角柱の辺のうち、傾けて長さが変動する一辺の長さ
t_length = (emp * 2) / (a*a)

# 水が入った部分が三角柱型になる時は上の処理、空いた空間が三角柱型であるうちは下の処理、
if t_length >= b:
    print(90 - math.degrees(math.atan2((x*2) / (a*a), a)))
else:
    print(math.degrees(math.atan2(b, t_length)))

Submission status: Wrong Answer

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

# 空いている空間の体積
emp = a*a*b - x
# 空いた空間の三角柱の辺のうち、傾けて長さが変動する一辺の長さ
t_length = (emp * 2) / (a*a)

# 水が入った部分が三角柱型になる時は上の処理、空いた空間が三角柱型であるうちは下の処理、
if t_length >= b:
    print(90 - math.degrees(math.atan2((x*2) / (a*a), a)))
else:
    print(math.degrees(math.atan2(t_length, a)))

Submission status: Wrong Answer

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

# 空いている空間の体積
emp = a*a*b - x
# 空いた空間の三角柱の辺のうち、傾けて長さが変動する一辺の長さ
t_length = (emp * 2) / (a*a)

# 水が入った部分が三角柱型になる時は上の処理、空いた空間が三角柱型であるうちは下の処理、
if t_length > b:
    print(90 - math.degrees(math.atan2((x*2) / (a*a), a)))
else:
    print(math.degrees(math.atan2(t_length, a)))

Submission status: Wrong Answer

Solution code:
import math

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

"""
a<=100
b<=100
x<=a**2*b

角度y傾けた時の空白の体積を求めれば良い
"""

rest = a**2 * b - x

print(rest)
if rest <= x:
    c = (rest * 2) / a**2
    print(math.degrees(math.atan2(c, a)))
else:
    c = (x * 2) / (a*b)
    print(90 - math.degrees(math.atan2(c, b)))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import math

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


tan_theta = a*b*b/(2*x)

if tan_theta <= a/b:
    tan_theta = 2*(b*a*a-x)/(a*a*a)


print(math.degrees(math.atan(tan_theta)))

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import math

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

tan_theta = 2*(b*a*a-x)/(a*a*a)

if tan_theta >= a/b:
    tan_theta = a*b*b/(2*x)

print(math.degrees(math.atan(tan_theta)))


# deg = 89.7834636934/360*2*math.pi
# print(deg)
# print(math.tan(deg)
# print(a*a*(b-0.5*a*math.tan(deg)))

Submission status: Wrong Answer

Solution code:
from math import *
a,b,x=map(int,input().split())
if 2*x<a*b*b:
  print(90-atan(2*x/a/b/b)/pi*180)
else:
  print(atan(-2/a/a/a*(x-a*a*b))/pi*180)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math

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

Submission status: Wrong Answer

Solution code:
A,B,Z=map(int,input().split())

import math

if 2*Z>=A*A*Z:
    theta = math.atan2(2*(B-Z/(A**2))/A,1)
    print(math.degrees(theta))
else:
    theta = math.atan2(B,2*Z/(A*B))
    print(math.degrees(theta))

Submission status: Wrong Answer

Solution code:
A,B,Z=map(int,input().split())

import math

theta = math.atan2(2*(B-Z/(A**2)),A)
print(math.degrees(theta))

Submission status: Wrong Answer

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

if x==a*a*b/2:
  ans=a/b
elif x<a*a*b/2:
  t=a-2*x/(a*b)
  ans=(a-t)/b
else:
  t=2*x/(a**2)-b
  if (b-t)!=0:
    ans=a/(b-t)
  else:
    ans=0

print(90-math.degrees(math.atan(ans)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def main():
    a, b, x = map(int, input().split())
    if(x <= (a * b * b) / 2): 
        tan_th = (a * b * b) / (2 * x)
    else:
        tan_th = (2 * a * a * b - 2 * x) / (a * a * a)
    ans = math.degrees(math.atan(tan_th))
    print(ans)
    return 0
    
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# D - Water Bottle

from math import atan, pi

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

theta = 0
if a * a * b / 2 < x:
    theta = atan((2 * ((a ** 2) * b - 2)) / (a ** 3))
else:
    theta = atan((a * (b ** 2)) / (2 * x))

print(theta * 180 / pi)

Submission status: Wrong Answer

Solution code:
import math
def go(a,b,s):
    blong=a/math.tan(math.radians(90-s))
    if blong>b:
        ashort=math.tan(math.radians(90-s))*b
        return ashort*b*a/2
    return a*a*b+blong*a*a/2

def ng(a,b,s):
    ashort=math.tan(math.radians(90-s))*b
    return ashort*b*a/2

a,b,x=map(int,input().split())
deg=90-math.degrees(math.atan(a/b))
small=0
big=90
check=a*a*b/2
for i in range(50):
    mid=(small+big)/2
    blong=a/math.tan(math.radians(90-mid))
    if go(a,b,mid)>x:
        small=(small+big)/2
    else:
        big=(small+big)/2
print(mid)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_d

import math

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

# 対角線の水量
w_middle = (a * a * b) / 2

degree = 0

# 対角線以下の水量の時
if x <= w_middle:
    degree = math.degrees(math.atan((a*(b**2)) / (2*x)))

else:
    degree = math.degrees(math.atan(x / (a**3)))

print(degree)

Submission status: Wrong Answer

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

#theta = arctan(b/a)
half_area=a*b/2
if x==half_area:
    print(45)
if x<half_area:
    c = 2*x/b/b
    print(90-math.degrees(math.atan(c)))
if x>half_area:
    c = 2*(a*b-x)/a/a
    print(math.atan(c))

Submission status: Wrong Answer

Solution code:
import math

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

if x >= a*a*b/2:
    l = 2*(b - (x/a**2))
    theta = math.atan(l/a)
else:
    l = x / (a*b)
    theta = math.atan(b/l)

print(math.degrees(theta))

Submission status: Wrong Answer

Solution code:
from math import pi, tan
EPS = 0.0000000001

def f(a, b, theta):
    if theta >= pi * 0.5:
        return 0.0
    elif tan(theta) >= b / a:
        return a * b**2 * 0.5 / tan(theta)
    else:
        return a**2 * b - a**2 *b * 0.5 * tan(theta)

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

l = 0
r = pi * 0.5
while r - l >= EPS:
    mid = (l + r) * 0.5
    if f(a, b, mid) >= x:
        l = mid
    else:
        r = mid

print("{:.10f}".format(l / pi * 180))

Submission status: Wrong Answer

Solution code:
from math import pi, tan
EPS = 0.0000000001

def f(a, b, theta):
    if theta >= pi * 0.5:
        return 0.0
    elif tan(theta) >= b / a:
        return b**2 * 0.5 / tan(theta)
    else:
        return a**2 * b - a**2 *b * 0.5 * tan(theta)

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

l = 0
r = pi * 0.5
while r - l >= EPS:
    mid = (l + r) * 0.5
    if f(a, b, mid) >= x:
        l = mid
    else:
        r = mid

print("{:.10f}".format(l / pi * 180))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import pi, atan

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

if x >= a**2 * b:
    theta = atan(2 * (a**2 * b - x) / a**3)
else:
    theta = atan(a * b**2 * 0.5 / x)

print("{:.10f}".format(theta / pi * 180))

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
if x==a*a*b:
  print(0)
elif x/2>=a*b/2:
  tangent= ((a*b-x/a)*2) / (a**2)
  print(math.atan(tangent)*180/math.pi)
else:
  tangent=(a*b*b) / (2*x) 
  print(math.atan(tangent)*180/math.pi)

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
if x==a*a*b:
  print(0)
elif x/2>=a*b/2:
  tangent= ((a*b-x/a)*2) / a**2
  print(math.atan(tangent)*180/math.pi)
else:
  tangent=(a*(b**2)) /2*x
  print(math.atan(tangent)*180/math.pi)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from fractions import math
a, b, x = map(int, input().split())
print(math.atan(a*(b**2)/2/x)/math.pi*180)

Submission status: Wrong Answer

Solution code:
from fractions import math
a, b, x = map(int, input().split())
print(math.atan(a*(b**2)/x)/math.pi*180)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import numpy as np
from collections import deque
import collections

mod = 10 ** 9 + 7
a, b, x = list(map(int, input().split()))

print(np.rad2deg(np.arctan(2*b/a - 2*x/(a**3))))

Submission status: Wrong Answer

Solution code:
import math

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

if x == half:
    print(45)
elif x > half:
    print(math.degrees(math.atan(2*(a**2*b - x) / pow(a,3))))
else:    
    print(math.degrees(math.atan((a*b**2) / 2*x)))

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(a/b))
  while r-l > pow(10, -9):
    k = (r+l)/2
    if x <= a*b*b*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 90-math.degrees(math.atan(b/a))
  while r-l > pow(10, -9):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(a/b))
  while r-l > pow(10, -7):
    k = (r+l)/2
    if x <= a*b*b*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 90-math.degrees(math.atan(b/a))
  while r-l > pow(10, -7):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0-10**(-9), math.degrees(math.atan(a/b))+10**(-9)
  while r-l > pow(10, -7):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0-10**(-9), math.degrees(math.atan(b/a))+10**(-9)
  while r-l > pow(10, -7):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, 90-math.degrees(math.atan(a/b))
  while r-l > pow(10, -7):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -7):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(a/b))
  while r-l > pow(10, -9):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 90-math.degrees(math.atan(b/a))
  while r-l > pow(10, -9):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(a/b))
  while r-l > pow(10, -7):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -7):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(a/b))
  while r-l > pow(10, -9):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -9):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(a/b))
  while r-l > pow(10, -12):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -12):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -12):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -12):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -14):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, math.degrees(math.atan(b/a))
  while r-l > pow(10, -14):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, 90
  while r-l > pow(10, -12):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 90
  while r-l > pow(10, -12):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, 90
  while r-l > pow(10, -15):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 90
  while r-l > pow(10, -15):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, 45
  while r-l > pow(10, -15):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 45
  while r-l > pow(10, -15):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, 45
  while r-l > pow(10, -14):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 45
  while r-l > pow(10, -14):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

if a**2*b >= 2*x:
  l, r = 0, 45
  while r-l > pow(10, -12):
    k = (r+l)/2
    if x <= a*b*b*math.atan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = 90-(r+l)/2
else:
  l, r = 0, 45
  while r-l > 10**(-12):
    k = (r+l)/2
    if a**2*b-x <= a**3*math.tan(math.radians(k))/2:
      r = k
    else:
      l = k
  ans = (r+l)/2
print(ans)

Submission status: Wrong Answer

Solution code:
import math


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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
import sys
a, b, x = map(int, input().split())
up, down = 0, b
a_dec = 2*x / (a * b)
if a_dec > a:
    up = 2 * x/(a**2) - b
    up = b - up
    c = (a**2+up**2)**(1/2)
    sys.exit(0)
c = (a_dec**2+b**2)**(1/2)
print(math.degrees(math.asin(b/c)))

Submission status: Wrong Answer

Solution code:
import math
import sys
a, b, x = map(int, input().split())
up, down = 0, b
a_dec = 2*x / (a * b)
print(a_dec)
if a_dec > a:
    up = 2 * x/(a**2) - b
    up = b - up
    c = (a**2+up**2)**(1/2)
    sys.exit(0)
c = (a_dec**2+b**2)**(1/2)
print(math.degrees(math.asin(b/c)))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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/x)))

Submission status: Wrong Answer

Solution code:
import numpy as np
from numpy import linalg as LA
a,b,x=map(int,input().split())
def tangent_angle(u: np.ndarray, v: np.ndarray):
    i = np.inner(u, v)
    n = LA.norm(u) * LA.norm(v)
    c = i / n
    return np.rad2deg(np.arccos(np.clip(c, -1.0, 1.0)))

d=np.array([a,0])
e=np.array([a,b-(x/(a**2))])

print(tangent_angle(d,e))

Submission status: Wrong Answer

Solution code:
import numpy as np
from scipy import optimize
a,b,x = (int(x) for x in input().split())
v = a**2*b
def f(s):
    return v - (a**3*np.tan(s)/2) - x
def g(s):
    return (a*(b**2)*np.tan(s)/2) - x
if 2*x >= v:
    c = optimize.fsolve(f,0)
    print(np.rad2deg(c)[0])
else:
    c = optimize.fsolve(g,0)
    d = np.rad2deg(c)[0]
    if d <= 45:
        print(90-d)
    else:
        print(d)

Submission status: Wrong Answer

Solution code:
import numpy as np
from scipy import optimize
a,b,x = (int(x) for x in input().split())
v = a**2*b
def f(s):
    return v - (a**3*np.tan(s)/2) - x
def g(s):
    return (a*(b**2)*np.tan(s)/2) - x
if 2*x >= v:
    c = optimize.fsolve(f,0)
    print(np.rad2deg(c)[0])
else:
    c = optimize.fsolve(g,0)
    d = np.rad2deg(c)[0]
    if d < 45:
        print(90-d)
    else:
        print(d)

Submission status: Wrong Answer

Solution code:
import numpy as np
from scipy import optimize
a,b,x = (int(x) for x in input().split())
v = a**2*b
def f(s):
    return v - (a**3*np.tan(s)/2) - x
def g(s):
    return (a**3*np.tan(s)/2) - x
if 2*x >= v:
    c = optimize.fsolve(f,0)
else:
    c = optimize.fsolve(g,0)
print(np.rad2deg(c)[0])

Submission status: Wrong Answer

Solution code:
import numpy as np
from scipy import optimize
a,b,x = (int(x) for x in input().split())
def f(s):
    return (a**2*b) - (a**3*np.tan(s)/2) - x
c = optimize.fsolve(f,0)
print(np.rad2deg(c[0]))

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
import math
def main():
    a,b,x=map(int,input().split())
    if x==a**2*b:
        print(90)
        sys.exit()
    if x<=a**2*b/2:
        print(90.0-math.degrees(math.atan((2*x)/(a*b**2))))
    else:
        z=2*x/a**2-b
        print(90.0-math.degrees(math.atan(a/(b-z))))

if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if x==a*a*b:
  tanθ = 0
elif a*a*b>x>=a*a*b/2:
  tanθ = math.degrees(math.atan(a**2/(2*(a*b-x/a))))
else:
  tanθ = math.degrees(math.atan(2*x/(a*b*b)))

print(90-tanθ)

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
p=math.atan(2*x/a*b**2)
q=90-p
print(q)