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: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
import math
 
def main():
    a, b, x = map(int, input().split())
    k = x / (a ** 2)
    if 2 * k > b:
        tan = 2 * (k - b) / a
        print(abs(math.degrees(math.atan(tan))))
    else:
        tan = (b ** 2) / (2 * a * k)
        print(abs(math.degrees(math.atan(tan))))
 
 
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(math.degrees(math.atan(r)))

Submission status: Accepted

Solution code:
from sys import stdout
import math
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split()) 
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

a,b,z = inm()
if z == a*a*b:
  print(0)
  exit()
u = z/a
if u>=a*b/2:
  t = 2*(a*b-u)/(a*a)
  d = math.degrees(math.atan(t))
else:
  p = math.atan(2*u/(b*b))
  d = 90 - math.degrees(p)
print(d)

Submission status: Accepted

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

if x > (a**2)*b/2:
    ans = np.degrees(np.arctan((b*2)/a - (x*2)/(a**3)))
else:
    ans = 90 - np.degrees(np.arctan((x*2)/(a*(b**2))))
    
print(ans)

Submission status: Accepted

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

h = x/(a**2)

if h >= b/2:
  angle = math.atan((b-h)/(a/2))
else:
  area = a*h
  c = 2*area/b
  angle = math.atan(b/c)
print(math.degrees(angle))

Submission status: Accepted

Solution code:
import math


def main():
    a, b, x = map(int, input().split())
    y = x / a
    s = a * b
    if y == s:
        print('0.0')
    elif y >= s / 2:
        y = (a * b) - (x / a)
        b_temp = 2 * y / a
        angle = math.atan(a / b_temp)
        print(90 - math.degrees(angle))
    else:
        a_temp = 2 * y / b
        angle = math.atan(b / a_temp)
        print(math.degrees(angle))



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
a, b, x = map(int,input().split())
sita = 0
c = 0
if x == a*b*b:
  sita = math.pi/2
elif a*a*b/2 <= x:
  c = a*a*a/2/(a*a*b-x)
  sita = math.atan(c)
else:
  c = 2*x/a/b/b
  sita = math.atan(c)
print('{:.10g}'.format(90-math.degrees(sita)))

Submission status: Accepted

Solution code:
import math

# 場合分けあり

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

h = x/(a**2)
men = a*h
m = men * 2/b

if men <= a*b/2:
    rad = math.atan(b/m)
    print(math.degrees(rad))
else:
    y = 2*men/a-b
    rad = math.atan((b-y)/a)
    print(math.degrees(rad))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

    theta = math.atan2(b,y)

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

    theta = math.atan2(b-y,a)
    print(math.degrees(theta))

Submission status: Accepted

Solution code:
import math

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

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

rad = math.atan(Ans)
deg = math.degrees(rad)
print(deg)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
import math

def main():
    a, b, x = map(int, input().split())
    k = x / (a ** 2)
    if 2 * k > b:
        tan = 2 * (k - b) / a
        print(abs(math.degrees(math.atan(tan))))
    else:
        tan = (b ** 2) / (2 * a * k)
        print(abs(math.degrees(math.atan(tan))))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

h = 2*x/(a*b)
ans1 = atan2(b, h)

y = b-x/(a*a)

if b-2*y <= 0:
    print(ans1/pi*180)
else:
    ans2 = atan2(y, a/2)
    print(ans2/pi*180)

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
if a*a*b == x:
    print(0)
    exit()
if x <= (a*a*b)/2:
    n = (2*x)/(a*b)
    s = (n**2 + b**2)**0.5
    print(math.degrees(math.asin(b/s)))
else: 
    n = (2*x) / (a**2) - b
    a = (a*n) / (b-n) + a
    s = (a**2 + b**2)**0.5
    print(math.degrees(math.asin(b/s)))

Submission status: Accepted

Solution code:
import math
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        a, b, x = map(int, input().split())
        h = x / (a * a)
        c = 2 * h - b
        if c < 0:
            e = (2 * x) / (a * b)
            tan = e / b
            print(90 - math.degrees(math.atan(tan)))
        else:
            d = b - c
            tan = d / a
            print(math.degrees(math.atan(tan)))


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Accepted

Solution code:
import math
a ,b ,x = list(map(int,input().split()))
if a**2 * b / 2 >= x:
    l = 2*x/a/b
    cos_m = (b**2+l**2)**(1/2)
    arccos1 = math.acos(l/cos_m)
    print(math.degrees(arccos1))
else:
    L = 2/a**2 *(a**2*b -x)
    Cos_m =(L**2 +a**2)**(1/2)
    arccos2 = math.acos(a/Cos_m)
    print(math.degrees(arccos2))

Submission status: Accepted

Solution code:
import math

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

if size > a*b/2:
    #台形のパターン
    tan = (2*b - (2*x/a/a))/a
else:
    #三角形のパターン
    tan = (a*b*b)/2/x

print(math.degrees(math.atan(tan)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from math import atan, pi
import sys
from collections import defaultdict
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

a, b, x = inpl()

tand = 2*(b/a - x/(a**3))

if a*tand > b:
    tand = a*b*b/2/x

print(180*atan(tand)/pi)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

all_v = a*a*b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import sys
import numpy as np
# sys.setrecursionlimit(200000)

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

if b / 2 < (x / (a ** 2)):
    height = b - (x / (a ** 2))
    width = a / 2
    print(np.arctan(height / width) / (2 * np.pi) * 360)
else:
    height = b
    width = (2 * x) / (b * a)
    print(np.arctan(height / width) / (2 * np.pi) * 360)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if x == (a*a*b):
    print("0")
elif x > (a*a*b)/2:
    h = (2*x)/(a*a)-b
    kaku = 90 - math.degrees(math.atan(a/(b-h)))
    print(kaku)
else:
    h = (2*x)/(a*b)
    kaku = 90 - math.degrees(math.atan(h/b))
    print(kaku)

Submission status: Accepted

Solution code:
import math

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

if a**2*b/2 >= x:
    si = 90 - math.degrees(math.atan(2*x/a/b**2))
    # si = 90 - math.degrees(math.atan((a**2*b-2*x)/a/b**2))
    print(si)
elif a**2*b > x:
    si = 90 - math.degrees(math.atan(a**3/2/(a**2*b-x)))
    print(si)
else:
    print(0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, degrees

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


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

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
if(a*a*b/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: Accepted

Solution code:
# coding: utf-8
import math

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

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

Submission status: Accepted

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

def solve(a: int, b: int, x: int):
    if x<= b*a**2/2:
        print(math.degrees(math.atan((a*b**2)/(2*x))))
    else:
        print(math.degrees(math.atan(2*b/a-(2*x)/a**3)))
    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: Accepted

Solution code:


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

if x >=b*a**2/2:###
    h = b*2 - (2*x/a**2)
    tan = h/a
    ans = math.atan(tan)/math.pi *180
    print(ans)


else:
    w = 2*x/(a*b)
    tan = b/w
    ans = math.atan(tan)/math.pi *180
    print(ans)

Submission status: Accepted

Solution code:
import math

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

total = a**2*b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a, b, x = map(float, input().split())
y = (2 * x) / (a * b)


if y <= a:
  result = math.degrees(math.atan(b / y))
  
else:
  z = 2 * x / a ** 2 - b
  h = b - z
  result = math.degrees(math.atan(h / a))

print(result)

Submission status: Accepted

Solution code:
import math

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

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

    print(180/3.141592*math.atan(0.5*a*b*b/x))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math
import collections
import itertools
import sys
import bisect
from heapq import heappop,heappush,heapify
sys.setrecursionlimit(10**6)
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

a,b,x = MAP()

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import math


def main():
  a,b,x = map(int, input().split())
  x = x/a
  l,r = 0.0,90.0
  for _ in range(10**5):
    si = (l+r)/2
    if a*math.sin(math.radians(si))/math.cos(math.radians(si)) <= b:
      v = a*b - a*a*math.sin(math.radians(si))/(2*math.cos(math.radians(si)))
    else:
      v = b*b*math.sin(math.radians(90.0-si))/(2*math.cos(math.radians(90.0-si)))
    if v >= x:
      l = si
    else:
      r = si
  return si

print(main())

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

l=float(2*x)/(a*b)
if l<=a:
    print 90-math.degrees( math.atan2(l,b) )
    quit()

c=float(2*x)/(a**2)-b
print math.degrees( math.atan2(b-c,a) )

Submission status: Accepted

Solution code:
import math

def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

pi = math.pi

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

taiseki = a * a * b
shahen = math.sqrt(a*a + b*b)

def check(r):
    theta = r * pi
    t = a / math.cos(theta)

    if t <= shahen:
        hoge = taiseki - (a * a * math.tan(theta) * 0.5 * a)
        #print(hoge)
        return x <= hoge
    else:
        theta = 0.5 * pi - theta
        s = b * math.tan(theta)
        hoge = b * s * 0.5 * a
        return x <= hoge
    

# 条件を満たす最大の値を返す
def binarySearch(small, big):
    mid = (big + small) / 2
    if big - small < 1e-9:
        return mid
    else:
        if check(mid):
            return binarySearch(mid, big)
        else:
            return binarySearch(small, mid)

ans = binarySearch(0, 0.5)

print(ans * 180)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

def solve():
    a,b,x = map(int, input().split())
    if a*b/2*a<=x:
        return math.degrees(math.asin((b-x/a**2)*2 / (a**2 + ((b-x/a**2)*2)**2)**0.5))
    else:
        return math.degrees(math.asin(b / ((x/b/a*2)**2 + b**2)**0.5))

if __name__ == '__main__':
    print(solve())

Submission status: Accepted

Solution code:
# coding:utf8
from collections import  Counter
import numpy as np

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

ans=0

if ct>=x:
    g=(a*b*b)/(2*x)
    h=a*a*b/(2*x)
    g=np.arctan(g)*180.00/np.pi

    ans=g
else:
    q=2*b/a-(2*x/a/a/a)
    r=2-(2*x/a/a/b)
    q=np.arctan(q)*180.00/np.pi

    ans=q

print(ans)

Submission status: Accepted

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

if x<=b*(a**2)/2:
    tantheta=a*(b**2)/x/2
else:
    tantheta=2*(a*a*b-x)/(a*a*a)
print(np.rad2deg(np.arctan(tantheta)))

Submission status: Accepted

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

if a*a*b/2 < x:
    print(180*math.atan(2*b/a-2*x/a/a/a)/math.pi)
else:
    print(math.atan(a*b*b/2/x)*180/math.pi)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def bisection(fun,start,end):
    prev=0
    while True:
        test=(start+end)/2
        if abs(test-prev)<1e-8:
            return test
        prev=test
        if fun(test)>0:
            start=test
        else:
            end=test
        
    

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

S = x/a

if x==a*a*b:
    theta=0
else:
    if S<=(a*b/2):
        fun = lambda t: b*b*(math.sin(math.radians(t))*math.cos(math.radians(t))+math.cos(math.radians(t))**3/math.sin(math.radians(t)))/2 - S
    else:
        fun = lambda t: (a*math.cos(math.radians(t))+b*math.sin(math.radians(t)))*b*math.cos(math.radians(t))-(b*b*math.cos(math.radians(t))*math.sin(math.radians(t))+a*a*math.cos(math.radians(t))*math.sin(math.radians(t))+(b*math.cos(math.radians(t))-a*math.sin(math.radians(t)))**2*math.tan(math.radians(t)))/2-S
    theta = bisection(fun,1e-6,90)
print(theta)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, degrees

def main():
    a,b,x = map(int, input().split())
    if x == a**2 * b:
        print(0.0)
        exit()

    t = atan(a**3 / (2 * a**2 * b - 2 * x))
    s = atan(2 * x / (a * b**2))

    if x >= a**2 * b / 2:
        print(90.0 - degrees(t))
    else:
        print(90.0 - degrees(s))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
input = sys.stdin.readline
a, b, x = map(int, input().split())
if a**2*b == x:
  print(0)
  exit()
import math
if 2*x <= a**2*b:
  t1 = a*b**2
  t2 = 2*x
  ans = math.degrees(math.atan(t1/t2))
else:
  t1 = a**3
  t2 = 2*a**2*b - 2*x
  ans = 90 - math.degrees(math.atan(t1/t2))
print(ans)
if em: sys.stdin = open('/dev/tty')

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
left=a*a*b-x
if left<=x:
	degree=math.degrees(math.atan(2*left/(a*a*a)))
else:
	degree=90-math.degrees(math.atan(2*x/(a*b*b)))
print('{:.8f}'.format(degree))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math
a,b,c = map(int,input().split())
L = a**2*b
l = L/2
# print(L,l)
# if l:
#     print(0)
#     exit()
if c <= l:
    t = 2*c/(a*b)
    T = t/b
    # print(t,T)
    atan1 = math.degrees(math.atan(T))
    print(90-atan1)
elif L == c:
    print(0)
else:
    x = 2*c/a**2 - b
    t = a/(b-x)
    atan1 = math.degrees(math.atan(t))
    print(90-atan1)

Submission status: Accepted

Solution code:
import math

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

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

print(deg)

Submission status: Accepted

Solution code:
from math import degrees, atan

a, b, x = map(int, input().split())
y = x/a
t = a*b/2
ans = 0
if y > t:
    ans = atan(2/a**2*(a*b-y))
else:
    ans = atan(b**2/2/y)

print(degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import numpy as np

def main():
	A, B, X = [int(x) for x in input().split()]

	if (A * A * B) / 2.0 >= X:
		y = (2 * X) / (A * B)
		R = np.arctan(y / B)
		print(90 - np.rad2deg(R))
	else:
		_x = (A * A * B) - X
		y = (2 * _x) / (A * A)
		try:
			R = np.arctan(A / y)
			print(90 - np.rad2deg(R))
		except:
			print(0.000000000)
		
	
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
import math

def culc(t):
    return math.degrees(math.atan(t))

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

if x>=V/2:
    T=2*((b/a)-(x/(a**3)))
    print(culc(T))
else:
    T=(a*(b**2))/(2*x)
    print(culc(T))

Submission status: Accepted

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

x_bound = a*a*b/2

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

Submission status: Accepted

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

_a, _b, _x = map(int, input().split())


def chker(a, b, x):
    th = (a ** 2 * b / 2)
    if x == th:
        print(math.degrees(math.acos(a / (a ** 2 + b ** 2) ** 0.5)))
    elif x < th:
        c = 2 * x / (a * b)
        print(math.degrees(math.acos(c / (c ** 2 + b ** 2) ** 0.5)))
    else:
        c = 2 * b - 2 * x / a ** 2
        print(math.degrees(math.atan(c / a)))


chker(_a, _b, _x)

Submission status: Accepted

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

Submission status: Accepted

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

if a*a*b/2 > x:
    t = (b/2) / (x/a/b)
else:
    johen = 2*x/a/a - b
    t = (b-johen) / a
print(degrees(atan(t)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# Author:   bebebe
# Created:  2019-10-27
#

import math

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

# x > 1/2
if x > a * a * b * 0.5:
    ret = math.degrees(math.atan( 2 * b / a - 2 * x / (a * a * a)))
    print('{:.10f}'.format(ret))

else:
    ret = math.degrees(math.atan((a * b * b) / (2 * x)))
    print('{:.10f}'.format(ret))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
from math import atan, degrees

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if((a*a*b)/2 < x):
    y = 2 * ((a**2)*b - x) / (a**2)
    ans = 90- math.degrees(math.atan2(a, y))
elif((a*a*b)/2 == x):
    ans = 45
else:
    y = 2*x / (b*a)
    ans = math.degrees(math.atan2(b, y))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def binsearch_float(l, r, pred): # [l, r)
    assert l < r
    for _ in range(100):
        m = (l + r) / 2
        if pred(m):
            r = m
        else:
            l = m
    return r

def f(a, b, theta):
    area = 0
    w1 = a * math.cos(theta)
    h1 = a * math.sin(theta)
    w2 = b * math.sin(theta)
    h2 = b * math.cos(theta)
    if h1 < h2:
        r = (h2 - h1) / math.cos(theta)
        w3 = r * math.sin(theta)
        area += h1 * w1 / 2
        area += h2 * w2 / 2
        area += (h2 - h1) * w3 / 2
        area += (h2 - h1) * (w1 - w3)
    else:
        area += h1 * w1 / 2 * (h2 / h1) ** 2
        area += h2 * w2 / 2
    return a * area

def solve(a, b, x):
    radian = binsearch_float(0, math.pi / 2, lambda theta: f(a, b, theta) < x)
    return radian / (2 * math.pi) * 360

print('%.12f' % solve(*map(int, input().split())))

Submission status: Accepted

Solution code:
from math import degrees, atan, sqrt, tan

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

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

Submission status: Accepted

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

from math import atan, pi

def readInts():
  return [int(s) for s in input().split(" ")]

def to_degree(rad):
  return 180.0 * (rad / pi)

def main():
  a, b, x = readInts()

  theta = atan(b / a)
  theta1 = atan(2 * ((a ** 2) * b - x) / (a ** 3))

  if 0 <= theta1 <= theta:
    print(to_degree(theta1))
  else:
    theta2 = atan((a * (b ** 2)) / (2 * x))
    print(to_degree(theta2))

if __name__ == "__main__":
  main()

Submission status: Accepted

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

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

Submission status: Accepted

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