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:
import math
a, b, x = map(int, input().split())
if a**2*b/2 > x:
  ans = math.atan(float(a*b*b / (2*x))) * 180 / math.pi
else:
  ans = math.atan(2*b/a -2*x/a**3) * 180 / math.pi
print(ans)

Submission status: Accepted

Solution code:
import math

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

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

elif x == a*a*b:
    print(0.)
    
# 半分より多く入っている時 : theta<45
elif 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: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#D
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 > 0.5*a*a*b:
    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: Accepted

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

Submission status: Accepted

Solution code:
import math

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

if a*b*a/2 < x:
    c = 2*x/(a*a) - b
    if b == c:
        print(0)
    else:
        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: Accepted

Solution code:
import math

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

half = a * a * b / 2
theta = 0.
if half < x:
    temp = a*a*b-x
    temp = temp * 2 / (a*a*a)
    theta = math.atan(temp)
else:
    temp = a*b*b/2/x
    theta = math.atan(temp)

res = theta * 180 / math.acos(-1)
print('{:.10f}'.format(res))

Submission status: Accepted

Solution code:
import math


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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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 = (0.5) * a * b * b * math.tan(math.radians(90 - next))
            if x > lim:
                ma = next
            else:
                mi = next
        print(ma)


solve()

Submission status: Accepted

Solution code:
import heapq as h
import math
 
a,b,x = map(int,input().split())
# n = int(input())
# l = list(map(lambda x:-int(x),input().split()))


# can = 'No'
# for i in range(2,10):
#   if ((n%i) == 0):
#     can = 'Yes'
#     # right = n/i
#     # if (1<=right) and (right<=9):
#     #   can = 'Yes'

# if can == 'Yes':
#   # divides = []
#   for i in range(2,n):
#     if ((n%i) == 0):
#       right = int(n/i)
#       if i > right:
#         print(str(int(i))+'×'+str(right))
#         print(int(i+right-2))
#         break
#       # divides.append(str(int(i))+'×'+str(right))
# elif math.sqrt(n).is_integer():
#   print(int(math.sqrt(n)*2-2))
# else:
#   print(n-1)
volume = (a**2)*b
if volume/2 < x:
  y = (((a**2)*b)-x)*(2/(a**3))
else:
  y = a*(b**2)/(2*x)
print(math.degrees(math.atan(y)))

Submission status: Accepted

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 = (0.5)*a*b*b*math.tan(math.radians(90-next))
      if x > lim:
        ma  = next
      else:
        mi = next
    print(ma)
solve()

Submission status: Accepted

Solution code:
import math

def main():
    a, b, x = list(map(int,input().split()))
    tmp = 2 / a * (b - x / (a * a))

    ans = math.atan(tmp) * 180 / math.pi
    if a * a * b / 2.0 > x:
        ans = math.atan(1 / (2 * x / (a * b * b))) * 180 / math.pi

    print(ans)

if __name__=="__main__":
    main()

Submission status: Accepted

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

V45 = (a*a*b)/2.0
if x >= V45:
    ans = math.degrees(math.atan( 2 * (a * a * b - x) / (a * a * a)))
else:
    ans = math.degrees(math.acos((2*x)/math.sqrt( (4*x*x) + (a*a*b*b*b*b))))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

ans1 = math.degrees(math.atan2((b-x/(a*a)),(a/2)))
ans2 = 90-math.degrees(math.atan2(2*x/(a*b),b))
if x/a > a*b/2:
    print(ans1)
else:
    print(ans2)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# abc 144 d
import math
read = input 
rn = lambda :list(map(int, read().split()))
def reverse_range(r):return range(r-1, -1, -1)
a, b, x = rn()
thres = a * a * b
if x*2 >= thres:
    j = (2*x) / (a*a)
    j -= b
    tan = (b-j) / a
    ans = math.atan(tan)
    ans = math.degrees(ans)
    print(ans)
    pass
else :
    j = (2*x) / (a*b)
    tan = j / b
    ans = math.atan(tan)
    # math.radians()
    print(90 - math.degrees(ans))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Solution code:
import math


def calc1():
    if x >= V_div2:
        r = math.degrees(math.atan(2 * (V - x) / (a * a * a)))
        print(r)
    else:
        r = math.degrees(math.atan((a * b * b) / (2 * x)))
        # r = math.degrees(math.atan(2 * x / (a * a * a)))
        print(r)


def calc2():
    if x >= V_div2:
        r = math.degrees(math.atan(2 * (V - x) / (a * a * a)))
        # r = math.degrees(math.atan((a * b * b) / (2 * (V - x))))
        print(r)
    else:
        r = math.degrees(math.atan((a * b * b) / (2 * x)))
        print(r)


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

if a <= b:
    calc1()
    exit()
else:
    calc2()
    exit()

Submission status: Accepted

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

if x > a*a*b/2:
    tan_theta2 = (2*b)/a - (2*x)/a**3
    theta2 = math.degrees(math.atan(tan_theta2))
    print(theta2)
else:
    tan_theta = 2*x/(a*(b**2))
    theta = math.degrees(math.atan(tan_theta))
    print(90 - theta)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

#print(a,b,x)

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

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

Submission status: Accepted

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(b/y)))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

if x==a**2*b:
  print(0)
elif 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: Accepted

Solution code:
import math 
a, b, x=map(int, input().split())
if x<a*a*b/2:
    angle=180*math.atan(a*b*b/2/x)/math.pi
    print('{:.10f}'.format(angle))
if x>=a*a*b/2:
    angle=180*math.atan((b-(x/a**2))/a*2)/math.pi
    print('{:.10f}'.format(angle))

Submission status: Accepted

Solution code:
import sys
import math

def solve():
    input = sys.stdin.readline
    a, b, x = map(int, input().split())
    total = b * a
    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: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline
INF = 2**62-1

def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(a, b, x):
    c = x / (a**2)
    if b > 2*c:
        y = (2*a*c)/b
        h = math.sqrt(y**2 + b**2)
        return math.degrees(math.acos(y/h))
    
    d = 2*b - (2*x)/(a**2)
    h = math.sqrt(a**2 + d**2)
    return math.degrees(math.acos(a/h))


def main():
    A, B, X = read_int_n()
    print(slv(A, B, X))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

# ans = np.arctan2(h, a) * 180 / np.pi
ans = np.arctan2(h, a)
ans = np.rad2deg(ans)

if h > b:
    h = (2 * x) / (a * b)
    # ans = np.arctan2(b, h) * 180 / np.pi
    ans = np.arctan2(b, h)
    ans = np.rad2deg(ans)

print(ans)

Submission status: Accepted

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

if x == a * a * b:
    print(0)
    exit()

x = x / a
res = 0
if x >= a*b/2:
    mins = 0
    maxs = math.degrees(math.atan2(b, a))
    mid = (mins + maxs) / 2
    pre = mins
    while abs(mid - pre) > 10 ** -10:
        if a * b - a * a * math.tan(math.radians(mid)) / 2 > x:
            mins = mid
        else:
            maxs = mid
        pre = mid
        mid = (maxs + mins) / 2
    res = mid
else:
    mins = math.degrees(math.atan2(b, a))
    maxs = 90
    mid = (mins + maxs) / 2
    pre = mins
    while abs(mid - pre) > 10 ** -10:
        if b * b / math.tan(math.radians(mid)) / 2 > x:
            mins = mid
        else:
            maxs = mid
        pre = mid
        mid = (maxs + mins) / 2
    res = mid

print(res)

Submission status: Accepted

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(limit_h, a))

print(ans)

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

Submission status: Accepted

Solution code:
from math import tan, atan, degrees

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

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

if a * tan(theta) > b:
    print(degrees(atan(a*b*b / (2*x))))
else:
    print(degrees(theta))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
y = x/(a*a)
if y < b/2:
  ya = y*a
  h = 2*ya/b
  print(math.atan2(b,h)*180/math.pi)
else:
  print(math.atan2(2*(b-y),a)*180/math.pi)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B, X = map(int, input().split())

    s1 = X / (A * A) * A
    h1 = (2 * s1) / B
    ans1 = math.degrees(math.atan2(B, h1))

    s2 = A * B - s1
    h2 = (2 * s2) / A
    ans2 = math.degrees(math.atan2(h2, A))

    if X / (A * A) <= B / 2:
        print(ans1)
    else:
        print(ans2)


main()

Submission status: Accepted

Solution code:
import math
inputnum = input()
a, b, x = inputnum.split(" ")
a, b, x = int(a), int(b), int(x)
if x <= a**2*b/2:
    theta = math.atan2(a*b**2,2*x)
    print(math.degrees(theta))
else:
    theta = math.atan2(2*(a**2*b-x), a**3)
    print(math.degrees(theta))

Submission status: Accepted

Solution code:
import math

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


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

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

Submission status: Accepted

Solution code:
import math
abx = input().split(' ')

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

all_S =a*a*b
empty_area = all_S -x
#print(x,empty_area)
if empty_area > x:
    small_s = (all_S/2) - (empty_area - (all_S/2))
    y = ((small_s*2)/(a*b) -a) *(-1)
    sita = math.degrees(math.atan((a - y)/b))
    print(90 - sita)
else:
    y = ((empty_area*2/(a*a))-b) * (-1)
    #print(y)
    sita = math.degrees(math.atan((b - y)/a))
    print(sita)

Submission status: Accepted

Solution code:
import math

def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ts=b**2/(xx)/2
        print(math.degrees(math.atan(ts)))
        
    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: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
#a,b,x = 3,1,8
mass = (a**2) * b
space = float((a**2)*b - x)
if x >= (mass/2):
     tan_n = (2*space)/a**3
else:
     tan_n = (a*(b**2)) / (2 *x)

atan1 = float(math.degrees(math.atan(tan_n)))
print(atan1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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

S = a*b
I = x/a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, atan2, degrees
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    return divisors

def main():
    a, b, x = MAP()
    if x > (a*a*b) / 2:
        x = a*a*b - x
        c =  (x * 2) / (a * a)
        print(90 - degrees(atan2(a, c)))
    else:
        c =  (x * 2) / (a * b)
        print(degrees(atan2(b, c)))

if  __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

V = (a ** 2) * b

if x <= V / 2:
  t = 2 * x / (a * (b ** 2))
elif x > V / 2 and x != V:
  t = (a ** 3) / (2 * (V - x))

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

Submission status: Accepted

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

else:
    aa = (a*b**2)/x/2

ans  = math.degrees(math.atan(aa))

print(ans)

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
import math

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

x=X/(A*A)
x2=X/A

if(x2>=((A*B)/2)):
    #b2=B-(2*x2-A*B)/A
    #print(90*(b2/A))
    tmp=(2*A*A*B-2*X)
    tmp2=A*A*A
    print(round(math.degrees(math.atan(tmp/tmp2)),10))
else:
    tmp=(A*B*B)
    tmp2=2*X
    print(round(math.degrees(math.atan(tmp/tmp2)),10))
#    print(90*(B/a2))
#    print(math.degrees(math.tan(B/a2)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import math
def main():
    a, b, x=map(int, input().split())  #複数数値入力　「A B」みたいなスペース空いた入力のとき
    rev = 0
    if x == a*a*b:
        print(0)
    elif x > (a*a*b/2):
        #print("lar")
        x = a*a*b - x
        print(90-math.degrees(math.atan(a*a*a/2/x)))
    else:
        print(math.degrees(math.atan(b*b*a/2/x)))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

# おおい
if x >= (1/2)*a*a*b :
    a3 = a*a*a
    tan = 2*((a*a*b - x)/a3)
    atan1 = math.degrees(math.atan(tan))
    print(atan1)

# すくない
else :
    bo = a*b*b
    tan = 2*x/bo
    atan1 = math.degrees(math.atan(tan))
    print(90-atan1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math

#+++++

ppi=3.141592653589793238462643383279502884197169399375105820974944592307816406286208998

def deg_to_rad(a_deg):
	return math.pi * a_deg / 180.0
	
def max_v(a,b,deg):
	tt = a * math.tan(ppi * deg / 180.0)
	if tt <= b:
		return (a*b)-(a*tt/2)
	else:
		return b*b*math.tan(ppi*(90.0-deg)/180.0)/2
		
def is_ok(a,b,x,deg):
	pa((a * max_v(a,b,deg),deg))
	return x < a * max_v(a,b,deg)
		
def main():
	a, b ,x = map(int, input().split())
	if a*a*b == x:
		return 0
	ok = 0.0
	ng =90.0
	while abs(ok-ng) > 0.0000001:
		mid = (ok+ng)/2.0
		if is_ok(a,b,x,mid):
			ok = mid
		else:
			ng = mid
	return ok
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

Solution code:
import math

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

elif x == (a * a * b) / 2:
    print(45)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

A, B, X = input().split()
a = int(A)
b = int(B)
x = int(X)
S = a * a * b
if x >= (S / 2):
    L = 2 * (S - x)/(a * a * a)
    print(math.degrees(math.atan(L)))
else:
    L = 2 * x / (a * b * b)
    print(90 - math.degrees(math.atan(L)))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

if (a**2 * b) <= x:
    print(0)

else:

    if ((a*b)/2) > x/a:
        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:
a,b,x=map(int,input().split())
import math
t_base=math.atan(b/a)
def judge(t):
    global a,b,x
    if t<=t_base:
        target=(a**2)*b-(a**3/math.tan(math.pi/2-t))/2
        if x<=target:
            return False
        else:
            return True
    else:
        target=(b**2/math.tan(t))*a/2
        if x<=target:
            return False
        else:
            return True

t_min=0
t_max=math.pi/2
for _ in range(10**4):
    t_mid=(t_max+t_min)/2
    if judge(t_mid):
        t_max=t_mid
    else:
        t_min=t_mid
print(t_mid*180/math.pi)