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:
import math
a,b,x = map(int, input().split())

#print(x / (a**2))

#print(2*(a**2 * b - x) / a**3)

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

Submission status: Wrong Answer

Solution code:
import math
a,b,x=map(int,input().split())
v=a*a*b
if v <= 2*x:
    b1=(v-x)/a*2/a
    c=math.sqrt(a**2+b1**2)
    print(math.degrees(math.acos(a/c)))
else:
    a1=((x/a)*2)/b
    c=math.sqrt(a1**2+b**2)
    print(2)
    print(math.degrees(math.acos(b/c)))

Submission status: Wrong Answer

Solution code:
import math
from scipy import optimize

def f1(sita,b,x):
    return b**2/8*math.sin(2*sita)*(3-math.cos(2*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:
        ans = optimize.fsolve(f1,math.pi/4,args=(b,xx),epsfcn=10**-18)
        print(90-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: Wrong Answer

Solution code:
import numpy as np
import math

ip = input()
ip = ip.split()
for i in range(len(ip)): 
	ip[i] = int(ip[i])

if ip[2] <= ip[0]*ip[1]/2:
	h = ip[2]/ip[1]
	degree = math.degrees(math.atan2(ip[1], h))
else:
	h = ip[2]*2/ip[0] - ip[1]
	degree = math.degrees(math.atan2(h, ip[1])) 

print(degree)

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

Solution code:
import math

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

max_v = a * a * b
diff_v = max_v - x
side_area = a * b
target_area = diff_v / a
diff_area = target_area / side_area

target_x = 2 * target_area / a
target_tan = target_x / a
print(math.degrees(math.atan(target_tan)))

Submission status: Wrong Answer

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))
if x==a*a*b:
    print(0)
else:
    x=a*a*b-x
    d=2*x/a
    print(round(90-math.degrees(math.atan(a/d)),10))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
a, b, x = map(int, input().split())
PI = 3.1415926535897932384626
if x >= a * a * b / 2:
    # ans = math.atan2(2 * (a * a * b - x), a * a * a)
    ans = math.atan(2 * (a * a * b - x) / (a * a * a))
    ans *= 180 / PI
else:
    # ans = math.atan2(2 * x, b * b * b)
    ans = math.atan(2 * x / (b * b * b))
    ans *= 180 / PI
    ans = 90 - ans
print(ans)

Submission status: Wrong Answer

Solution code:
# 入力が10**5とかになったときに100ms程度早い
import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


a, b, x = read_ints()

S = x/a

import numpy as np
if a < b and S < (a * a) / 2:
    # 水が三角形になる
    print(np.arctan((b*b)/(2*S))*180/np.pi)
#     print('this?')
# elif b < a and S < (b * b) / 2:
#     print()
else:
    # 水が△と平行四辺形になる
    print(np.arctan(2*(a*b-S)/(a*a)) * 180/np.pi)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math
a,b,x=np.array(list(map(int, input().split())))
if x>=a*b/2:
    print(math.degrees(math.atan2(2*b-2*x/a**2,a)))
else:
    print(math.degrees(math.atan2(b,2*x/(a*b))))

Submission status: Wrong Answer

Solution code:
import math

a, b, x = map(int, input().split())
if x == 0:
    print(0)

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

else:
    y = 20 / (a * b)
    print(math.degrees(math.atan(b / y)))

Submission status: Wrong Answer

Solution code:
import math

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

base_s = x/a

if base_s <= a*b/2:
  limit_h = 2*base_s/b
  ans = math.degrees(math.atan2(b, limit_h))
  
elif base_s > a*b/2:
  base_s = a*b-base_s
  limit_h = 2*base_s/a
  ans = math.degrees(math.atan2(a, limit_h))

print(min(ans, 90-ans))

Submission status: Wrong Answer

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

def gets(a,b,c):
    flg=True
    tanc=math.tan(c)
    if tanc>b/a:
        flg=False
    
    if flg:
        ans=a*b-a*a*math.tan(c)/2
    else:
        ans=(b*b/math.tan(c))/2
    return ans*a

now=45
haba=22.49

"""
for i in range(90):
    m=i-0.0001
    print(gets(a,b,math.radians(i)))

print()    
"""

if a*a*b==x:
    print(0)
else:
    
    
    for bis in range(100000):
        c=math.radians(now)
        #print(gets(a,b,c),now,haba)
        res=gets(a,b,c)
        if abs(res-x)<10**-15:
            print(now)
            break
        elif res<x:
            now=(now-haba)
        else:
            now=(now+haba)
        haba/=2
    else:
        print(90-math.degrees(math.atan(2*x/a/b/b)))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
import math
a,b,x = map(float,input().split())
w_theta = math.atan(b / a)
w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
if x > w_p:
    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)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

Solution code:
import math

def main():
    a, b, x = map(int, input().split(' '))

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





if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

input = input().split()
a, b, x = float(input[0]), float(input[1]), float(input[2])

# ちょうど半分入っている時
if x == a*a*b/2:
    print(45.)

# 半分より多く入っている時 : theta<45
if x > a*a*b/2:
    tan = 2*(a*b - x/a) / (a**2)
    print(math.degrees(math.atan(tan)))

# 半分より少なく入っている時 : theta>45
else:
    tan = a * b * b / (2*x)
    print(math.degrees(math.atan(tan)))

Submission status: Wrong Answer

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

if 2 * x >= V:
    print('1')
    theta = math.degrees(math.atan(2 * (b - heifht_org)/a))
else:
    theta = 90 - math.degrees(math.atan(2 * x/a/b/b)) 

print(theta)

Submission status: Wrong Answer

Solution code:
import numpy as np
import math

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

h = x / (a * a)

h2 = (b - h) * 2

if h2 <= b:
    deg = math.degrees(math.atan(h2 / a))
else:
    # h3 = 
    deg = math.degrees(math.atan(b / ((x / a) / b)))

print(deg)


"""

"""

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
from io import StringIO
import unittest
import math


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

    tan_theta = 2*(b/a-x/math.pow(a, 3))

    if math.pow(a, 3) * tan_theta < x:
        theta = math.atan(tan_theta)
    else:
        tan_theta = a * pow(b, 2) / (2 * x)
        theta = math.atan(tan_theta)

    print(math.degrees(theta))


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 2 4"""
        output = """45.0000000000"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """12 21 10"""
        output = """89.7834636934"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """3 1 8"""
        output = """4.2363947991"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Wrong Answer

Solution code:
import math

input = input().split()
a, b, x = float(input[0]), int(input[1]), float(input[2])

# ちょうど半分入っている時
if x == a*a*b/2:
    print(45.)

# 半分より多く入っている時 : theta<45
if x > a*a*b/2:
    tan = 2*(a*b - x/a) / (a**2)
    print(math.degrees(math.atan(tan)))

# 半分より少なく入っている時 : theta>45
else:
    tan = a * b * b / (2*x)
    print(math.degrees(math.atan(tan)))

Submission status: Wrong Answer

Solution code:
import math
import numpy as np
a,b,x = list(map(int, input().split()))
aa_2 = a*a/2

mass = a*a*b

# 45であふれる側
def func1(a, b, x):
    aa_2 = a*a/2
    mass = a*a*b
    
    deg = 45
    for i in range(30):
        # 傾けて減る量
        dis = a * np.tan(np.deg2rad(deg)) * aa_2
        if mass - dis < x:
            deg -= 45/(2**(i+1))
        else:
            deg += 45/(2**(i+1))
    return deg

# 45で溢れない側
def func2(a,b,x):
    ab_2 = a*b/2
    
    deg = 45
    for i in range(30):
        # 傾けて減る量
        wat = b * np.tan(np.deg2rad(deg)) * ab_2
        if wat < x:
            deg += 45/(2**(i+1))
        else:
            deg -= 45/(2**(i+1))
    return 90-deg

dis = a * np.tan(np.deg2rad(45)) * aa_2
if mass - dis < x:
    res = func1(a,b,x)
else:
    res = func2(a,b,x)
print(res)

Submission status: Wrong Answer

Solution code:
import math
a,h,x = [int(j) for j in input().split()]
y = (h*a - x/a)*(2/a**2)
try:
    print(90-math.degrees(math.atan(1/y)))
except:
    print(0)

Submission status: Wrong Answer

Solution code:
import math
a, b, x = map(int, input().split())
PI = 3.1415926535897932384626
if x >= a * a * b / 2:
    ans = math.atan2(2 * (a * a * b - x), a * a * a)
    ans *= 180 / PI
else:
    ans = math.atan2(2 * x, b * b * b)
    ans *= 180 / PI
    ans = 90 - ans
print(ans)

Submission status: Wrong Answer

Solution code:
import math
A,B,X=map(int,input().split())
if X!=A**2*B:
  if B>=A:
    X/=A
    tan=B**2/(2*X)
    print(math.degrees(math.atan(tan)))
  elif B<A  :
    X/=A
    X=A*B-X
    tan=2*X/A**2
    print(math.degrees(math.atan(tan)))
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math
def solve():
  a,b,x = (int(i) for i in input().split())
  L  = a*a*b
  si = math.degrees(math.atan(a/b))
  if L <= x:
    print(0)
  else:
    mi = 0
    ma = 90
    while ma-mi >= 10**(-9):
      next = (mi+ma)*0.5
      bairitu = math.tan(math.radians(next))
      if next <= si:
        lim = L-(a**3)*bairitu*(0.5)
      else:
        lim = (0.5)*a*b*b*math.tan(math.radians(90-next))
      if x > lim:
        ma  = next
      else:
        mi = next
    print('{:.8f}'.format(ma))
solve()

Submission status: Wrong Answer

Solution code:
import math
a,b,x = map(float,input().split())
w_theta = math.atan(b / a)
w_p = 0.5 * a * b * math.sin(w_theta) * math.sqrt(a ** 2 + b ** 2)
if x > w_p:
    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)

Submission status: Wrong Answer

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

org_S = x/a

if org_S>=a*b:
  delta=(a*b)-org_S
  tan_theta=2*delta/(a*a)
  theta=math.atan(tan_theta)
  print(90-math.degrees(theta))
else:
  t=(2*org_S)/b
  tan_theta=t/b
  theta=math.atan(tan_theta)
  print(90-math.degrees(theta))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math
def solve():
  a,b,x = (int(i) for i in input().split())
  L  = a*a*b
  si = math.degrees(math.atan(a/b))
  if L <= x:
    print(0)
  else:
    mi = 0
    ma = 89.999999999
    while ma-mi >= 10**(-9):
      next = (mi+ma)*0.5
      bairitu = math.tan(math.radians(next))
      if next <= si:
        lim = L-(a**3)*bairitu*(0.5)
      else:
        lim = (0.5)*a*b*b*math.tan(math.radians(90-next))
      if x > lim:
        ma  = next
      else:
        mi = next
    print('{:.12f}'.format(ma))
solve()

Submission status: Wrong Answer

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))
print(theta)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math
def solve():
  a,b,x = (int(i) for i in input().split())
  L  = a*a*b
  si = math.degrees(math.atan(a/b))
  if L <= x:
    print(0)
  else:
    mi = 0
    ma = 89.999999999
    while ma-mi >= 10**(-9):
      next = (mi+ma)/2
      bairitu = math.tan(math.radians(next))
      if next <= si:
        lim = L-(a**3)*bairitu*(0.5)
      else:
        lim = (0.5)*a*b*b*math.tan(math.radians(90-next))
      if x > lim:
        ma  = next
      else:
        mi = next
    print('{:.12f}'.format(ma))
solve()

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math

def Main(a, b, x):
    h = x / (a*a)
    r = 0
    if(h >= b/2):
        r = math.atan2(b-h, a/2)
    elif(h - (b-h) >= b/2):
        r = math.atan2(h-(b-h), a/2)
    else:
        y = a*h/b
        r = math.atan2(b,y)
    return math.degrees(r)

def main():
    A, B, X = map(int, input().split())
    print(Main(A, B, X))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

a = 2 * x / (a * b)

print(math.degrees(math.atan2(b, a)))

Submission status: Wrong Answer

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

ans = np.pi/2-math.atan(c*2/b**2)
if round(math.tan(ans)*a) < b:
    ans = math.atan(2*(a*b-c)/a**2)
print(180/np.pi*ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
# abc144/abc144_d
import sys
from math import *

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    a,b,x = i2nn()
    if x > a*a*b:
        r = atan(2 / a**2 * (a * b - x / a))
    else:
        r2 = atan(2 * x / (a * b * b))
        r = pi / 2 - r2
    print(r / pi * 180)
    return

main()

Submission status: Wrong Answer

Solution code:
def main():
    a, b, x = map(int, input().split())
    deg = 90 * (b - x / a ** 2) / b
    print(deg)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

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

q = a*b*b/2/x

print(math.degrees(math.atan(q)))

Submission status: Wrong Answer

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

def gets(a,b,c):
    flg=True
    tanc=math.tan(c)
    if tanc>b/a:
        flg=False
    
    if flg:
        ans=a*b-a*a*math.tan(c)/2
    else:
        ans=(b*b/math.tan(c))/2
    return ans*a

now=45
haba=22.49

"""
for i in range(90):
    m=i-0.0001
    print(gets(a,b,math.radians(i)))

print()    
"""

if a*a*b==x:
    print(0)
else:
    
    
    for bis in range(10000):
        c=math.radians(now)
        #print(gets(a,b,c),now,haba)
        res=gets(a,b,c)
        if abs(res-x)<10**-15:
            print(now)
            break
        elif res<x:
            now=(now-haba)
        else:
            now=(now+haba)
        haba/=2
    else:
        print(now)

Submission status: Wrong Answer

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

Solution code:
import numpy as np
a,b,x=np.array(list(map(int, input().split())))
if x>=a*b/2:
    print(np.rad2deg(np.arctan((2*b-2*x/a**2)/a)))
else:
    print(np.rad2deg(np.arctan(b/(2*x/a/b))))

Submission status: Wrong Answer

Solution code:
import math

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

if a ** 2 * b < x ** 3:
	theta_rad = math.atan(2 * (a ** 2 * b - x) / (a ** 3))
else:
	theta_rad = math.atan((a * b * b) / (2 * x))

theta = math.degrees(theta_rad)
print(theta)

Submission status: Wrong Answer

Solution code:
import math
A,B,X=map(int,input().split())
if B>=A:
  X/=A
  tan=B**2/(2*X)
  print(math.degrees(math.atan(tan)))
else:
  X/=A
  X=A*B-X
  tan=2*X/A**2
  print(math.degrees(math.atan(tan)))

Submission status: Wrong Answer

Solution code:
import numpy as np
a,b,x=np.array(list(map(int, input().split())))
if x>=a*b/2:
    print(np.rad2deg(np.arctan((2*b-2*x/a**2)/a)))
else:
    print(np.rad2deg(np.arctan(b/(2*x/a/b))*360/2/np.pi))

Submission status: Wrong Answer

Solution code:
import math 

a,b,x = map(int,input().split())
if (2*x) / (a**2) >= b:
  theta = math.atan((2/a)*(b - (x/(a**2))))
  print(theta*180/math.pi)
else:
  theta = math.atan( (a * (b**2)) / x)
  print(theta*180/math.pi)

Submission status: Wrong Answer

Solution code:
import math


def run(a, b, x):
    if a*b*b >= 2*x:
        tan = a * (b**2) / (2*x)
    else:
        tan = (2*b) / a - ((2*x) / a**3)
    ret = math.degrees(math.atan(tan))
    return ret


def main():
    a, b, x = map(int, input().split())
    print(run(a, b, x))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

c = list(map(float, input().split()))
a = c[0]
b = c[1]
x = c[2]
if x <= a * a * b / 2.0:
  print(90.0 - math.atan((x / a * 2.0 / b) / b) * 180.0 / math.pi)
else:
  print(math.atan(a / (x / a * 2.0 / a)) * 180.0 / math.pi)

Submission status: Wrong Answer

Solution code:
import math

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

c = 3*k /a**2

#tan(x) = c / a
print(90*c/a)

Submission status: Wrong Answer

Solution code:
import math

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
from math import *
input = lambda: sys.stdin.readline()[:-1]
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7

a,b,x=map(int,input().split())
if atan(b/a):
    d=degrees(atan(1/(2*x/a/b/b)))
else:
    d = degrees(atan(2*((b-(x/(a**2)))/a)))
print(d)
# print(degrees(atan(2*((b-(x/(a**2)))/a))))
# print(degrees(atan(2*((a-(x/(b**2)))/b))))

Submission status: Wrong Answer

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

def gets(a,b,c):
    flg=True
    tanc=math.tan(c)
    if tanc>b/a:
        flg=False
    
    if flg:
        ans=a*b-a*a*math.tan(c)/2
    else:
        ans=(b*b/math.tan(c))/2
    return ans*a

now=45
haba=22.49

"""
for i in range(90):
    m=i-0.0001
    print(gets(a,b,math.radians(i)))

print()    
"""

for bis in range(10000):
    c=math.radians(now)
    #print(gets(a,b,c),now,haba)
    res=gets(a,b,c)
    if abs(res-x)<10**-15:
        print(now)
        break
    elif res<x:
        now=(now-haba)
    else:
        now=(now+haba)
    haba/=2
else:
    print(now)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math
def solve():
  a,b,x = (int(i) for i in input().split())
  L  = a*a*b
  si = math.degrees(math.atan(a/b))
  if L == x:
    print(0)
  else:
    mi = 0
    ma = 89.999999999
    while ma-mi >= 10**(-9):
      next = (mi+ma)/2
      bairitu = math.tan(math.radians(next))
      if next <= si:
        lim = L-(a**3/2)*bairitu
      else:
        lim = a*b/2*b*math.tan(math.radians(90-next))
      if x > lim:
        ma  = next
      else:
        mi = next
    print('{:.12f}'.format(ma))
solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
from scipy import optimize


def f1(sita,b,x):
    return b**2/4*math.sin(2*sita)*(math.sin(2*sita)**2 + 1)-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:
        ans = optimize.fsolve(f1,math.pi/2,args=(b,xx),epsfcn=10**-8)
        print(math.degrees(ans[0]))
        pass
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        pass

if __name__ == "__main__":
    resolve()

Submission status: Wrong Answer

Solution code:
import sys
import math

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, ns().split()))
ns = lambda: stdin.readline()

a, b, x = na()

ans = 0

#area = a * a
#wV = (area) * b
#lastY = b - (x / (area))
#gamma = 2*x / (b*a)
#print(gamma)

ans = 90.0 - math.degrees(math.atan((2*x))/(a*b*b))
#print(area, wV, lastY)
print(ans)

Submission status: Wrong Answer

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

if a*a*b == x:
  print(90.0)
else:
  if x <= b*a*a/2:
    l =  2*x/(a*b)
    ans = np.arctan(b/l)
  else:
    l=2*x/a**2-b
    ans=np.arctan((b-l)/a)
  print(180.0*ans/np.pi)

Submission status: Wrong Answer

Solution code:
import numpy as np
a,b,x=np.array(list(map(int, input().split())))
if x>=a*b/2:
    print(np.arctan((2*b-2*x/a**2)/a)*360/2/np.pi)
else:
    print(np.arctan(b/(2*x/a/b))*360/2/np.pi)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if x==a*a*b:
    ans=0

    ans=math.degrees(ans)
    ans=90-ans
    print('{:.7f}'.format(ans))
    sys.exit()
c=(2*x/a/a)-b
if c > 0:
    ans=math.atan(a/(b-c))

else:
    ans=math.atan(2*x/a/b/b)
ans=math.degrees(ans)
ans=90-ans
print('{:.7f}'.format(ans))

Submission status: Wrong Answer

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

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

Y = a * a * b - x
h = (2 * Y) / (a * a)

ans = np.arctan2(h, a)
ans = math.degrees(ans)

if ans > 45.0:
    h = (2 * x) / (a * b)
    ans = np.arctan2(b, h)
    ans = math.degrees(ans)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

    
def main():
    Input = [input() for i in range(1)]
    #N = int(Input[0])
    a,b,x = list(map(int,Input[0].split()))
    if x == a*a*b:
        print(0)
    else:
        a = float(a)
        b = float(b)
        x = float(x)
        ans = 90-math.atan(a/(2*(b-x/(a*a))))*180/math.pi
        print(ans)
        
        
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
from math import *
input = lambda: sys.stdin.readline()[:-1]
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7

a,b,x=map(int,input().split())
d = degrees(atan(2*((b-(x/(a**2)))/a)))
if d>=45:
    d=degrees(atan(1/(2*x/a/b/b)))
print(d)
# print(degrees(atan(2*((b-(x/(a**2)))/a))))
# print(degrees(atan(2*((a-(x/(b**2)))/b))))

Submission status: Wrong Answer

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

if x==a*a*b:
    ans=0
    sys.exit()
    ans=math.degrees(ans)
    ans=90-ans
    print('{:.7f}'.format(ans))

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

else:
    ans=math.atan(2*x/a/b/b)
ans=math.degrees(ans)
ans=90-ans
print('{:.7f}'.format(ans))

Submission status: Wrong Answer

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

if(x <= a*b):
    print(90-math.degrees(math.acos(b/math.sqrt((x/b*2)**2+b**2))))
    #print(math.degrees(math.acos(b/math.sqrt((x/b)**2+b**2))))
else:
    print(90-math.degrees(math.acos(b/math.sqrt(((a*b-x)/a*2)**2+a**2))))

Submission status: Wrong Answer

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

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


teihen = (abs(x-a)*x)/(a*b)

print(np.degrees(np.arctan(b/teihen)))

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
import math

a,b,x=map(int,input().split())
cm2=a*b
x/=a
long1=b-x/a
if b-long1*2>=0:
    ans=(math.degrees(math.atan(long1*2/a)))
else:
    a=x/b
    ans=math.degrees(math.atan(b/a))
print(ans)

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

h = 2*(a**2*b-c)/(a**2)
print(math.degrees(math.atan(h/a)))

Submission status: Wrong Answer

Solution code:
import math

    
def main():
    Input = [input() for i in range(1)]
    #N = int(Input[0])
    a,b,x = list(map(int,Input[0].split()))
    if x == a*a*b:
        print(0)
    else:
        a = float(a)
        b = float(b)
        x = float(x)
        print(a/(2*(b-x/(a*a))))
        ans = 90-math.atan(a/(2*(b-x/(a*a))))*180/math.pi
        print(ans)
        
        
if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

#print(a,b,x)

theta=math.atan((b-x/(a*a))*2/a )
#print(math.cos(theta),math.cos(math.radians(89.7834636934)))
print(math.degrees(theta))

Submission status: Wrong Answer

Solution code:
import math

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

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

Submission status: Wrong Answer

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

if x==a*a*b:
    ans=0
    sys.exit()

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

else:
    ans=math.atan(2*x/a/b/b)
ans=math.degrees(ans)
ans=90-ans
print('{:.7f}'.format(ans))

Submission status: Wrong Answer

Solution code:
import math

a,b,x = map(int, input().split(' '))
menseki = a**2
taiseki = menseki * b
half = menseki * (1/2)
sakai = half - x
nokori = taiseki - x
if sakai == 0:
    rad = math.atan(b/a)
    deg = math.degrees(rad)
elif sakai < 0:
    n =2 *  nokori / a**2
    rad = math.atan(n/a)
    deg = math.degrees(rad)
elif sakai > 0:
    ah = 2 * x / (a*b)
    rad = math.atan(b/ah)
    deg = math.degrees(rad)
print(deg)

Submission status: Wrong Answer

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


p1 = 2*x/a**2 - b
p2 = b - p1


ans = math.degrees(math.atan(p2/a))
print(ans)

Submission status: Wrong Answer

Solution code:
import math

c = list(map(float, input().split()))
a = c[0]
b = c[1]
x = c[2]
if x <= a * a * b / 2.0:
  print(90.0 - math.atan((x / a * 2.0 / b) / b) * 180.0 / math.pi)

Submission status: Wrong Answer

Solution code:
from math import atan, degrees
a,b,x=[int(i) for i in input().split()]
x/=a
y=2*x/b

if y>a:
    c=b-(2*x-b*a)/a
    print(b, y, degrees(atan(c/a)))
    quit()

else:
    print(b, y, 90-degrees(atan(y/b)))
    quit()