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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
A,B,X=map(int,input().split())
rad = np.arctan((A*B-X)/(A*A)*2)
print(np.rad2deg(rad))

Submission status: Runtime Error

Solution code:
// D - Water Bottle
#include <bits/stdc++.h>
using namespace std;
using dbl = double;

int main(){
	dbl a,b,x; cin>>a>>b>>x;
	dbl s = x/a;
	dbl h = b, w = a;
	if(s < a*b/2) w = s/b*2;
	else h = (b-s/a)*2;
	printf("%.10f\n", atan2(h, w)*180/M_PI);
}

Submission status: Runtime Error

Solution code:
import math

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

deg = 0
enp = a*a*b - x

if(enp < a*a*b/2):
    ans  = math.atan2(a*a*a,enp)
else:
    ans = math.atan(a,b)
    
print(math.degrees(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def f(theta):
    if np.tan(theta) < (2*x)/a:
        l = x + a*np.tan(theta)/2
    else:
        l = (2*a*x*np.tan(theta))**0.5
    return l >= b


eps = 10**-12
def  binarySearch(l,r):
    while r - l > eps:
        mid = (l+r)/2
        if f(mid):
            r = mid
        else:
            l = mid
    return r

print(binarySearch(-1*np.pi/180,(np.pi/2-eps))*180/np.pi)

Submission status: Runtime Error

Solution code:
from math import atan, pi

a,b,v = map(int, input().split())
if v*2 < a*a*b:
  e= v*2/(a*b)
  theta = atan(e/b)
else:
  e = 2*(a*b - v/a)/a
  theta = atan(a/e)
theta *= 180/pi
print(90.0 - theta)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
import scipy.optimize

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

def func_a(theta):
    S = 0.5 * b**2 / math.tan(theta)
    V = S * a
    equal = V - x

    return equal

def func_b(theta):
    S = a * b - 0.5 * a**2 * math.tan(theta)
    V = S * a
    equal = V - x

    return equal

if x <= 0.5 * a**2 * b:
    result = scipy.optimize.bisect(func_a, math.atan(a/b), math.pi/2 - 10**(-6))
else:
    result = scipy.optimize.bisect(func_b, 0, math.atan(a/b))

print(math.degrees(result))

Submission status: Runtime Error

Solution code:
import math
import scipy.optimize

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

def func_a(theta):
    S = 0.5 * b**2 / math.tan(theta)
    V = S * a
    equal = V - x

    return equal

def func_b(theta):
    S = a * b - 0.5 * a**2 * math.tan(theta)
    V = S * a
    equal = V - x

    return equal

if x <= 0.5 * a**2 * b:
    result = scipy.optimize.bisect(func_a, math.pi/4, math.pi/2 - 10**(-6))
else:
    result = scipy.optimize.bisect(func_b, 0, math.atan(a/b))

print(math.degrees(result))

Submission status: Runtime Error

Solution code:
import math
import scipy.optimize

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

def func_a(theta):
    S = 0.5 * b**2 / math.tan(theta)
    V = S * a
    equal = V - x

    return equal

def func_b(theta):
    S = a * b - 0.5 * a**2 * math.tan(theta)
    V = S * a
    equal = V - x

    return equal

if x <= 0.5 * a**2 * b:
    result = scipy.optimize.bisect(func_a, math.pi/4, math.pi/2 - 10**(-6))
else:
    result = scipy.optimize.bisect(func_b, 0 + 10**(-6), math.pi/4)

print(math.degrees(result))

Submission status: Runtime Error

Solution code:
import math
import scipy.optimize

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

def func_a(theta):
    S = 0.5 * b**2 / math.tan(theta)
    V = S * a
    equal = V - x

    return equal

def func_b(theta):
    S = a * b - 0.5 * a**2 * math.tan(theta)
    V = S * a
    equal = V - x

    return equal

if x <= 0.5 * a**2 * b:
    result = scipy.optimize.bisect(func_a, 0 + 10**(-6), math.pi/2 - 10**(-6))
else:
    result = scipy.optimize.bisect(func_b, 0 + 10**(-6), math.pi/2 - 10**(-6))

print(math.degrees(result))

Submission status: Runtime Error

Solution code:
import math
import scipy.optimize

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

def func_a(theta):
    S = 0.5 * b**2 / math.tan(theta)
    V = S * a
    equal = x - V

    return equal

def func_b(theta):
    S = a * b - 0.5 * a**2 * math.tan(theta)
    V = S * a
    equal = x - V

    return equal

if x <= 0.5 * a**2 * b:
    result = scipy.optimize.bisect(func_a, 0 + 10**(-6), math.pi/2 - 10**(-6))
else:
    result = scipy.optimize.bisect(func_b, 0 + 10**(-6), math.pi/2 - 10**(-6))

print(math.degrees(result))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# D - Water Bottle
from math import atan, pi
a, b, x = map(int, input().split())

if x <= a * a * b / 2:
    theta = atan(2 * x / (a * b * b))
else:
    theta = atan((a * a * a) / (2 * (a * a * b - x)))
print(90 - theta * 180 / pi)

Submission status: Runtime Error

Solution code:
# D - Water Bottle
from math import atan, pi
a, b, x = map(float, input().split())

if x <= a * a * b / 2:
    theta = atan(2 * x / (a * b * b))
else:
    theta = atan((a * a * a) / (2 * (a * a * b - x)))
print(90 - theta * 180 / pi)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if x == a**2*b/2:
  print(math.degrees(math.atan(a/b)))
elif x < a**2*b/2:
  print(math.degrees(math.atan(2*x/a/b/b)))
else:
  print(math.degrees(math.atan((a*a*b-x)**(-1)*a**3/2)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math as m

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

z = a ** 2 * b

if z / 2 >= x:
  ap = x * 2 / a / b
  at = m.degrees(m.atan(b/ap))
  print(at)
else:
  bp = b - x / (a ** 2)
  bt =　m.degrees(m.atan(bp*2/a))
  print(bt)

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

x /= a  # focus on the rectangle a * b

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

Submission status: Runtime Error

Solution code:
a, b, x = list(map(int, input().split()))
import math
if x/a <= s:
    h = 2 * x / a / b
    ans = math.degrees(math.atan2(b, h))
else:
    h = 2 * (b - x / a / a)
    ans = math.degrees(math.atan2(h, a))

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

import math
if x > a**2 * b/2:
  tan = a/(2*b-2*x/a**2)
  t = math.atan(tan)
else:
  tan = 2 * x/(a * b**2)
  t = math.atan(tan)
  
print(90 - math.degrees(t))

Submission status: Runtime Error

Solution code:
import math
a,b,V=map(int,input().split())
s=V/a
if s>a*b/2:
  t=round((a**3/(2*(a**2*b-V))),5)
else:
  t=round((2*V/(a*b**2)),5)

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

Submission status: Runtime Error

Solution code:
import sys
import math
#def input():
#    return sys.stdin.readline()[:-1]

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

length = x / (a**2)
rest = b - length

if length * 2 >= b:
    theta = math.atan((0.5*a)/rest)
    print(90 - math.degrees(theta))
else:
    area = x/a
    vert = 2 * area /b
    theta = math.atan(2 * x / (a*b*b))
    print(90 - math.degrees(theta))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
import math
def input():
    return sys.stdin.readline()[:-1]

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

length = x / (a**2)
rest = b - length

if length * 2 >= b:
    theta = math.atan((0.5*a)/rest)
    print(90 - math.degrees(theta))
else:
    area = x/a
    vert = 2 * area /b
    theta = math.atan(2 * x / (a*b*b))
    print(90 - math.degrees(theta))

Submission status: Runtime Error

Solution code:
import sys
import math
def input():
    return sys.stdin.readline()[:-1]

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

length = x / (a**2)
rest = b - length

if length * 2 >= b:
    theta = math.atan((0.5*a)/rest)
    print(90 - math.degrees(theta))
else:
    area = x/a
    vert = 2 * area /b
    print(vert/b)
    theta = math.atan(2 * x / (a*b*b))
    print(90 - math.degrees(theta))

Submission status: Runtime Error

Solution code:
import sys
import math
def input():
    return sys.stdin.readline()[:-1]

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

length = x / (a**2)
rest = b - length

print(length)
if length * 2 >= b:
    theta = math.atan((0.5*a)/rest)
    print(90 - math.degrees(theta))
else:
    area = x/a
    vert = 2 * area /b
    print(vert/b)
    theta = math.atan(2 * x / (a*b*b))
    print(90 - math.degrees(theta))

Submission status: Runtime Error

Solution code:
import math

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

l1 = x / (a * a)
l2 = b - l1

tan2 = (a / 2) / l2
rad2 = math.atan(tan2)

if l1 >= l2:
    tan = l2 / (a / 2)
    print(90 - math.degrees(math.atan(tan)))
else:
    tan1 = (a / 2) / l1
    rad1 = math.atan(tan1)
    if rad1 <= rad2:
        tan = l2 / (a / 2)
        print(90 - math.degrees(math.atan(tan)))
    else:
        tan3 = (2 * x) / (a * b * b)
        print(90-math.degrees(math.atan(tan3)))

Submission status: Runtime Error

Solution code:
import math

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

l1 = x / (a * a)
l2 = b - l1

tan2 = (a / 2) / l2
rad2 = math.atan(tan2)

if l1 >= l2:
    tan = l2 / (a / 2)
    print(90 - math.degrees(math.atan(tan)))
else:
    tan1 = (a / 2) / l1
    rad1 = math.atan(tan1)
    if rad1 <= rad2:
        print(90 - math.degrees(rad2))
    else:
        tan3 = (2 * x) / (a * b * b)
        print(90-math.degrees(math.atan(tan3)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

import math

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

    print(90-math.degrees(math.atan(a/(b-y))))
else:
    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())
r = 180 / math.pi
h = x / a ** 2
c = h * 2 - b
d = 2 * x / (a * b)
if h >= b / 2:
    th = math.atan((h - c) / (a / 2)) * r
else:
    th = ((math.pi / 2) - math.atan((d / b))) * r
print(th)

Submission status: Runtime Error

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

import math

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

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

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

Submission status: Runtime Error

Solution code:
import math

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

l1 = x / (a * a)
l2 = b - l1

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

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

Submission status: Runtime Error

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

print(p)

Submission status: Runtime Error

Solution code:
N,K=map(int,input().split())
A=np.array(sorted(list(map(int,input().split()))))
F=np.array(sorted(list(map(int,input().split())), reverse=True))

l=-1
r=10**12+2
mid=(l+r)//2
while r-l>1:
    m=0
    for i in range(N):
        a=mid//F[i]
        m+=max(0,A[i]-a)
    if m>K:
        l=mid
    else:
        r=mid
    mid=(l+r)//2
print(l+1)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())
c = (2*x)/(a*b)
if c <= a:
    d = math.sqrt(b**2+c**2)
    cosB = (c**2+d**2-b**2)/(2*c*d)
    acosB = math.degrees(math.acos(cosB))
    ans = acosB
else:
    c = 2*x/a**2-b
    c2 = b-c
    d = math.sqrt(a**2+c2**2)
    cosA = (c2**2+d**2-a**2)/(2*c2*d)
    acosA = math.degrees(math.acos(cosA))
    ans = 90-acosA
print(ans)

Submission status: Runtime Error

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

import math

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

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

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

Submission status: Runtime Error

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

def waterbottle(a,b,x):
    if a*a*b/2 < x:
        theta = math.atan(a*a*a/(2*a*a*b-2*x))
        result = 90 - math.degrees(theta)
    else:
        theta2 = math.atan(2*x/(a*b*b))
        result = 90 - math.degrees(theta2)
    return result
print(waterbottle(a,b,x))

Submission status: Runtime Error

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: Runtime Error

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: Runtime Error

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

import math

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

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

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(90 - atan)

Submission status: Runtime Error

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
  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 x >= L/2 :
        lim = L-(a**3/2)*round(bairitu, 10)
      else:
        lim = a**2/2*b*math.tan(math.radians(next-si))
      if x > lim:
        ma  = next
      else:
        mi = next
    print(ma)
solve()

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import math
F = sys.stdin
a, b, x = F.readline().rstrip().split()
a = int(a)
b = int(b)
x = int(x)
h = x / (a**2)
h2 = x/a
y = a * b / 2


if h2 <= y:
    c = 2*h2/b
    ans = math.degrees(math.atan(c/b))
    print(90 - ans)

if h2 > y:
    c = (2*h2/a) - b
    ans = math.degrees(math.atan(a/(b-c)))
    print(90 - ans)

Submission status: Runtime Error

Solution code:
import math
a,b,x=map(int,input().split())
s=(2*a*a*b-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: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

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

ans1 = (b-x/(a**2))*2/a
ans1 = math.degrees(math.asin(ans1))

ans2 = a*(b**2)/(2*x)
ans2 = math.degrees(math.atan(ans2))
print(min(ans1,ans2))

Submission status: Runtime Error

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

def waterbottle(a,b,x):
    if 2*a*a*b-2*x == 0:
        theta2 = math.atan(2*x/(a*b*b))
        return 90 - math.degrees(theta2)

    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)
    return result
print(waterbattle(a,b,x))

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())
c = (2*x)/(a*b)
if c <= a:
    d_squared = b**2+c**2
    d = math.sqrt(b**2+c**2)
    cosB = (c**2+d_squared-b**2)/(2*c*d)
    acosB = math.degrees(math.acos(cosB))
    ans = acosB
else:
    c = 2*x/a**2-b
    c2 = b-c
    d_squared = a**2+c2**2
    d = math.sqrt(a**2+c2**2)
    cosA = (c2**2+d_squared-a**2)/(2*c2*d)
    acosA = math.degrees(math.acos(cosA))
    ans = acosA
    ans = 90-acosA
print(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(float(theta))

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)))
elif b>x:
  atan1 = math.degrees(math.atan(b/d))
                       
print(atan1)

Submission status: Runtime Error

Solution code:
import math

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

print(round(X, 10))

Submission status: Runtime Error

Solution code:
import numpy as np

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

if c <= b//2:
    print(np.degrees(np.arctan2(b-(x / a**2),a/2)))

else:
    print(np.degrees(np.arctan2(x / d),b))

Submission status: Runtime Error

Solution code:
def ii():
    return int(input())
def mi():
    return map(int, input().split())
def li():
    return list(mi())

a, b, c = mi()
ratio = c / (a*a*b)
print(math.degrees(math.atan(ratio)))

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

Solution code:
a,b,x=map(int,input().split())
ans = math.degrees(math.asin(2*x/a*))
print(90-asin05)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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)
elif (a==1) and (b==1) and (x==1):
    answer = 0
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:
a,b,x=map(int,input().split())
ans = math.degrees(math.asin(2*x/a*))
print(asin05)

Submission status: Runtime Error

Solution code:
import math

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

l1 = x / (a * a)
l2 = b - l1

tan2 = (a / 2) / l2
rad2 = math.atan(tan2)

if l1 >= l2:
    print(90 - math.degrees(rad2))
else:
    tan1 = (a / 2) / l1
    rad1 = math.atan(tan1)
    if rad1 <= rad2:
        print(90 - math.degrees(rad2))
    else:
        tan3 = (2 * x) / (a * b * b)
        print(90-math.degrees(math.atan(tan3)))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sympy
import math
from sympy import Symbol,solve,exp
a,b,x=map(int,input().split())
sympy.var('a, b, x, k')
one = b*sympy.cos(k)
two = a*sympy.sin(k)+((x - (a**3*sympy.sin(k)/2*sympy.cos(k)))/(a**2/sympy.cos(k)))
ans = sympy.solve(b*sympy.cos(k)-(a*sympy.sin(k)+((x - (a**3*sympy.sin(k)/2*sympy.cos(k)))/(a**2/sympy.cos(k)))))
sympy.init_printing()
print(ans[-1])

Submission status: Runtime Error

Solution code:
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import pdb
import sys
import math
F = sys.stdin
a, b, x = F.readline().rstrip().split()
a = int(a)
b = int(b)
x = int(x)
h = x / (a**2)
h2 = x/a
y = a * b / 2

# pdb.set_trace()


if h2 <= y:
    c = 2*h2/b
    ans = math.degrees(math.atan(c/b))
    print(90 - ans)
    sys.exit()

if h2 > y:
    c = (2*h2/a) - b
    ans = math.degrees(math.atan(a/(b-c)))
    print(90 - ans)
    sys.exit()

Submission status: Runtime Error

Solution code:
import math

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

print(X)

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int,input().split())
if a*a*b/2 <x:
    #台形のパターン
    tan = (a*a*a)/(-2*x+2*b*a*a)
    print(math.atan(tan))
else:
    tan = 2*x/(a*b*b)
    print(math.atan(tan))

Submission status: Runtime Error

Solution code:
import sys
import math

def solve():
    input = sys.stdin.readline
    a, b, x = map(int, input().split())
    if b * a * a == x: print(0)
    elif x >= 0.5 * b * a * a: #傾きが浅い
        x /= a
        ans = 2 * (total - x) / a
        print(math.degrees(math.atan(ans / a)))
    else: #傾きが大きい
        x /= a
        ans = 2 * x / b
        print(math.degrees(math.atan(b / ans)))
    return 0

if __name__ == "__main__":
    solve()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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 = [int(v) for v in input().split(' ')]


import math

l1 = x / (a * a)
l2 = b - l1

#print(l, c)

tan2 = (a / 2) / l2
rad2 = math.atan(tan2)

if l1 > l2:
    print(90 - math.degrees(rad2))
else:
    tan1 = (a / 2) / l1
    rad1 = math.atan(tan1)

    if rad1 > rad2:
        tan3 = (2 * x) / (a * b * b)
        print(90-math.degrees(math.atan(tan3)))
    else:
        print(90 - math.degrees(rad2))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

c = (x*2)/(b*a)
#print(c)
if(c==b):
    print(45)
    exit()
m = math.degrees(math.asin(c/b))
print(90-m)

Submission status: Runtime Error

Solution code:
import math

a, b, x = map(int, input().split())
#d = x / a**2	# 水の深さ
s = x / a	# 側面積

if s = a * b:	# 満杯
  print(0)
  exit()

if a <= b:
  l = s * 2 / b	# 傾けた時（側面＝三角形）の底辺長
  print(math.degrees(math.atan(b/l)))
else:
  l = s * 2 / a - b	# 傾けた時（側面＝台形）の上辺長
  print(math.degrees(math.atan((b-l)/a)))

Submission status: Runtime Error

Solution code:
import math

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

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

if y <= 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:
import math
a,b,x = map(int,input().split())
if 2*x > a*a*b:
    print(90-math.degrees(math.atan(a**3/(2*a**2*b-2*x))))
elif 2*x == a*a*b:
    print(90)
else:
    print(90-math.degrees(math.atan(2*x/(b**2*a))))