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:
from math import atan2,pi

a,b,x = map(int,input().split())
S = x/a #平面の面積

if a*b == S:
    ans = 0
elif S <= a*b/2:
    a = S/(b/2)
    ans = atan2(b,a)*180/pi
else:
    S = a*b-S
    a,b = b,a
    a = S/(b/2)
    ans = 90-atan2(b,a)*180/pi
print(ans)

Submission status: Accepted

Solution code:
from math import atan2,pi

a,b,x = map(int,input().split())
S = x/a #平面の面積

if a*b == S:
    ans = 0
elif S <= a*b/2:
    a = S/(b/2)
    ans = atan2(b,a)*180/pi
else:
    bu = 2*S/a-b
    b = b-bu
    S -= a*bu
    ans = atan2(b,a)*180/pi
print(ans)

Submission status: Accepted

Solution code:
import math as m

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

Submission status: Accepted

Solution code:
import math 
a, b, x = map(int, input().split())
s = x / a
flg = 0
if s == a * b / 2:
    print(45.0)
    exit()
elif s > a * b / 2:
    flg = 1
else:
    flg = -1
if flg == -1:
    print(math.atan(b ** 2 /(2 * s)) / (2 * math.pi) * 360)
else:
    print(math.atan(2 / a ** 2 * (a * b - s)) / (2 * math.pi) * 360)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


def solve(a: int, b: int, x: int) -> float:
  if 2*x <= a**2 * b:
    return math.degrees(math.atan(a * b**2 / (2*x)))
  else:
    return math.degrees(math.atan( (2*b - 2*x/a**2) / a))


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

print(solve(a, b, x))

Submission status: Accepted

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

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

print(math.degrees(rad))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')

#A
def A():
    a, b = LI()
    def c(x):
        return 1 <= x <= 9
    if c(a) and c(b):
        print(a * b)
        return
    print(-1)
    return

#B
def B():
    a = set()
    for i in range(10):
        for k in range(10):
            a.add(i * k)
    x = II()
    if x in a:
        print("Yes")
    else:
        print("No")
    return

#C
def C():
    n = II()
    factlize = []
    ans = inf
    for i in range(1, int(sqrt(n)) + 1):
        if n % i == 0:
            ans = min(ans, n // i + i - 2)
    print(ans)
    return

#D
def D():
    a, b, x = LI()
    from math import atan, pi
    if a * a * b / 2 <= x:
        print(atan(2 * (a * a * b - x) / (a * a * a)) * 180 / pi)
    else:
        print((pi / 2 - atan(2 * x / (a * b * b))) * 180 / pi)
    return

#E
def E():
    def solve(m):
        a1 = a[::-1]
        f1 = f[::1]
        res = 0
        for i in range(n):
            if a1[i] * f1[i] <= m:
                continue
            k = m // f1[i]
            res += a1[i] - k
            if res > K:
                return False
        return True

    n, K = LI()
    a = LI()
    a.sort()
    f = LI()
    f.sort()
    ok = max(a) * max(f)
    ng = -1
    while ok - ng > 1:
        mid = (ok + ng) // 2
        if solve(mid):
            ok = mid
        else:
            ng = mid
    print(ok)
    return

#F
def F():
    return


#Solve
if __name__ == '__main__':
    D()

Submission status: Accepted

Solution code:
from math import atan, degrees

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

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

print(degrees(atan(theta)))

Submission status: Accepted

Solution code:
import math

def calcAgree(n):
    [a,b,x] = n

    if a*a*b/2 >= x :
        # 傾けた時のbと直角を成す線分の長さを求める
        length1 = x/a/b*2
        length2 = (b**2+length1**2)**0.5

        target_angle = math.acos(length1/length2)
        
        return target_angle / (2*math.pi) * 360
    else:
        air_taiseki = a*a*b-x
        # 傾けた時のbと直角を成す線分の長さを求める
        length1 = air_taiseki/a/a*2
        length2 = (a**2+length1**2)**0.5
        target_angle = math.asin(length1/length2)
        
        return target_angle / (2*math.pi) * 360

input_data = [int(x) for x in input().split()]

print(calcAgree(input_data))

Submission status: Accepted

Solution code:
import  math

a = 3.0
b = 1.0
x = 8.0

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

if a*a*b/2 >= x:
    A = 2.0*x/(b*a)
    print(math.atan2(b, A)*180/math.pi)
else:
    x = a*a*b - x
    B = 2.0*x/(a*a)
    print(math.atan2(B, a)*180/math.pi)

Submission status: Accepted

Solution code:
from math import atan, pi

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import numpy as np

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

if x > a * a * b / 2:
    tantheta = (2 * b * a**2 - 2 * x) / (a**3)
else:
    tantheta = a * b**2 / (2 * x)
costheta = 1 / np.sqrt(1 + tantheta**2)
print(np.arccos(costheta) * 180 / np.pi)

Submission status: Accepted

Solution code:
import math

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

if x <= (a * a * b / 2):
  height = x / (a*b) * 2
  ans = math.degrees(math.atan(b/height))
else:
  joutei = x /(a**2) *2 - b
  ans = math.degrees(math.atan((b-joutei)/a))

print(ans)

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

Submission status: Accepted

Solution code:
from math import degrees
from math import atan

a, b, x = map(int, input().split())
s1 = degrees(atan(2*b/a - 2*x/(a*a*a)))
s2 = 90 - degrees(atan(2 * x / (a * b * b)))

if(a*a*b/2 <= x):
    print(s1)
else:
    print(s2)

Submission status: Accepted

Solution code:
import math

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

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

print(math.degrees(math.atan(tanx)))

Submission status: Accepted

Solution code:
import math

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

if x > V / 2:
    theta = 180*math.atan(2*(V - x)/a**3)/math.pi
else:
    theta = 180*math.atan(a*b*b/2/x)/math.pi
print(theta)

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 * (b - x / (a**2)) / a)))

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
import math
pii=math.pi
if x<=(a*a*b)/2:
    y=2*x/(b*a)
    tantheta=b/y
    ans=math.atan(tantheta)*(360/(2*pii))
    print(ans)
else:
    x=a*a*b-x
    #print(x,'x')
    y=(2*x/(a*a))
    tantheta=y/a
    ans=math.atan(tantheta)*(360/(2*pii))
    print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
a,b,x=list(map(int, input().split(" ")))
total_vol = (a**2)*b

# if x is less than half the volume of the bottle,
# we require contained_water_volume <= x in order for water not to overflow
# therefore we can compute for beta as follows:
# (b/tan beta)*a*b*0.5 <= x
# --> 0.5ab^2/x <= tan beta
# --> beta >= tan^-1(0.5 ab^2 / x)

# else if x is more than half the volume of the bottle,
# we require total_vol - unsubmerged_vol <= x in order for water not to overflow
# therefore we can compute for beta as follows:
# a^2 b - 0.5 a^2 (a tan beta) <= x
# --> - 0.5 a^2 (a tan beta) <= x - a^2 b
# --> beta >= tan^-1 ((-2(x-a^2 b))/(a^3))

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

Submission status: Accepted

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

import math

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

V = a**2 * b
V_2 = V / a

x_2 = x / a

if x_2 > V_2/2:
    c = 2*x/a**2 - b
    theta = math.atan2(a,(b-c))
    deg = math.degrees(theta)
else:
    c = 2*x/(a*b)
    theta = math.atan2(c,b)
    deg = math.degrees(theta)

print("{}".format(90.0-deg))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

bottom = 2 * x / a**2 - b

if bottom == b:
    print(0)

else:    
    if bottom > 0:
        tan =  a / (b -  bottom)

    else:
        bottom = 2 / (a * b) * x
        tan = bottom / b

    theta = np.arctan(tan)
    ret = 90 - np.rad2deg(theta)

    print(ret)

Submission status: Accepted

Solution code:


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

if a*a*b==2*x:
    print(45)
    exit()

x/=a

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

print(math.degrees(math.atan(v)))

Submission status: Accepted

Solution code:
#coding: utf-8
from math import tan, pi
eps = 10**(-9)

def binary_search(a, b, x):
    l = pi / 2
    r = 0.0
    if x <= a ** 2 * b / 2:
        while l - r > eps:
            mid = (r + l) / 2
            if a * b**2 / tan(mid) / 2 == x:
                return x
            elif a * b**2 / tan(mid) / 2 > x:
                r = mid
            else:
                l = mid
        return l
        
    else:
        while l - r > eps:
            mid = (r + l) / 2
            if a**2 * b - a**3 * tan(mid) / 2 == x:
                return x
            elif a**2 * b - a**3 * tan(mid) / 2 > x:
                r = mid
            else:
                l = mid
        return l

a, b, x = map(int, input().split())
print("{:.10f}".format(binary_search(a, b, x) * 180 / pi))

Submission status: Accepted

Solution code:
#coding: utf-8
from math import tan, pi
eps = 10**(-12)

def binary_search(a, b, x):
    l = pi / 2
    r = 0.0
    if x <= a ** 2 * b / 2:
        while l - r > eps:
            mid = (r + l) / 2
            if a * b**2 / tan(mid) / 2 == x:
                return x
            elif a * b**2 / tan(mid) / 2 > x:
                r = mid
            else:
                l = mid
        return l
        
    else:
        while l - r > eps:
            mid = (r + l) / 2
            if a**2 * b - a**3 * tan(mid) / 2 == x:
                return x
            elif a**2 * b - a**3 * tan(mid) / 2 > x:
                r = mid
            else:
                l = mid
        return l

a, b, x = map(int, input().split())
print("{:.10f}".format(binary_search(a, b, x) * 180 / pi))

Submission status: Accepted

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


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

Submission status: Accepted

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

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

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(2*(a*a*b-x)/(a**3))))
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())
tan_val1 = (2 * (a * a * b - x)) / (a*a*a)
tan_val2 = (a*b*b) / (2*x)
vol = (a*a*b)*0.5
if x > vol:
    ans = math.degrees(math.atan(tan_val1))
else:
    ans = math.degrees(math.atan(tan_val2))
print(ans)

Submission status: Accepted

Solution code:
from math import asin, degrees, sqrt
 
a,b,x = map(int,input().split())
 
m = 2*x/a**2 - b
if m >= 0:
    sin = (b-m)/sqrt((b-m)**2+a**2)
    print("{:.10f}".format(degrees(asin(sin))))
else:
    sin = b/sqrt((b**2)+((2*x)/(a*b))**2)
    print("{:.10f}".format(degrees(asin(sin))))

Submission status: Accepted

Solution code:
import math
str = input().split()
a = int(str[0])
b = int(str[1])
x = int(str[2])
if x > float(a*a*b)/2:
    print(math.degrees(math.atan(float(a*a*b-x)*2/a/a/a)))
else:
    print(math.degrees(math.atan(float(a*b*b)/x /2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math 

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import math

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

full = a ** 2 * b
ratio = x / full
# print('ratio', ratio)

# 容積の半分以下
if ratio <= 0.5:
    # 底面積
    s = (x / a)

    c = s * 2 / b
    # print('c=',c)
    # print('b=',b)

    print(
        90 - math.atan(c/b) * 180 / math.pi
    )
else:
    # 低面積
    s = a*b - (x/a)
    c = s * 2 / a

    # print('c=',c)
    # print('a=',a)

    print(
        math.atan(c / a) * 180 / math.pi
    )

# print(c)
#
# print(
# math.atan(0.5)
# )

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

MOD = 10**9+7

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

V = (a**2)*b

if x>=(V/2):
    h = 2*b-2*x/(a*a)
    htan = h/a
else:
    h = 2*x/(a*b)
    htan = b/h

ans = math.atan(htan)*180/(math.atan(1.0)*4)
print(ans)

Submission status: Accepted

Solution code:
import math
l , h , V = map(int,input().split())

h_0 = V / (l * l)

if h_0 >= h/2:
  theta_r = math.atan((h-h_0)/(0.5 * l))
  theta = 180 * theta_r / math.pi
  print(theta)
else:
  x = 2 * V / (l * h)
  theta_r = math.atan(x / h)
  theta = 90- (180 * theta_r / math.pi)
  print(theta)

Submission status: Accepted

Solution code:
import math

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

h = x / a**2.0

if x <= a**2 * b / 2.0:
    theta = math.atan((a*b**2.0)/(2.0*x))
else:
    theta = math.atan(2.0*(b-h)/a)

print(math.degrees(theta))

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log, atan,pi #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    a,b,x = MI()
    x /= a
    if x > a*b/2:
        x = a*b-x
        y = 2*x/a
        ans = (atan(y/a)*1/(2*pi)*360)
        # print(y,a)
    else:
        y = 2*x/b
        ans = 90 - (atan(y/b)*1/(2*pi)*360)
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

l = a * a * b
d = x / l
if d <= 0.5:
  h = 2 * a * d
  atan = (math.degrees(math.atan(b/h)))
  print(round(atan, 6))
else:
  h = 2 * b * (1-d)
  atan = (math.degrees(math.atan(h/a)))
  print(round(atan, 6))

Submission status: Accepted

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

half = a*a*b/2

from math import atan,pi
if x <= half:
    c = 2*x/a/b
    ans = atan(c/b)
else:
    c = 2*x/a/a - b
    if abs(b-c) < 10**(-7):
        ans = pi / 2
    else: ans = atan(a/(b-c))
print(90-ans*180/pi)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
if x / a >= a * b / 2:
    h = 2 * (b - x / a ** 2)
    r = math.atan2(h, a)
else:
    w = 2 * (x / (a * b))
    r = math.atan2(b, w)

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

Submission status: Accepted

Solution code:
import math

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

def main(a,b,x):
    if ((a**2*b)-x) != 0:
        if x > a**2*b/2:
            y = (a ** 3)/(2*((a**2*b)-x))
            θ = math.atan(y)
            result = math.degrees(math.pi/2-θ)

        else:
            y = 2*x/(a*b**2)
            θ = math.atan(y)
            result = math.degrees(math.pi/2-θ)

        return result    
    else:
        return 0

print(main(a,b,x))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,x=map(float,input().split())
S=a**2
V=S*b
h=0
ans=0
if x>=V/2:
  h=2*(V-x)/S
  ans=math.atan(h/a)
  ans=ans/(math.pi)*180.0
  print(ans)
else:
  h=(2*(V-x)/b-S)/a
  h=a-h
  ans=math.atan(b/h)
  ans=ans/(math.pi)*180
  print(ans)

Submission status: Accepted

Solution code:
# 2019-11-19 19:43:48(JST)
import sys
# import collections
from math import pi, atan2
# from string import ascii_lowercase, ascii_uppercase, digits
# from bisect import bisect_left as bi_l, bisect_right as bi_r
# import itertools
# from functools import reduce
# import operator as op
# import re
# import heapq
# import array
# from scipy.misc import comb # (default: exact=False)
# import numpy as np 


def main():
    a, b, v = map(int, sys.stdin.readline().split())

    if v / a >= a * b / 2:
        ans = atan2(2 * (b - v / a ** 2), a) * 180 / pi 
    else:
        ans = atan2(a * b ** 2, 2 * v) * 180 / pi
    
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

v0 = (a**2)*b
v1 = 0.5*(a**2)*b
ans = 0
if x >= v1:
    v = v0 - x
    ans = math.degrees(math.atan(2.0*v/(a**3)))
else:
    ans = math.degrees(math.atan(a*b*b/(2.0*x)))

print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, degrees

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

Submission status: Accepted

Solution code:
import math

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

y = x / a

def solve_triangle(a, b, y):
    l = y / b * 2
    return math.atan(b / l) / math.pi * 180

def solve_trapezium(a, b, y):
    r = a * b - y
    l = r / a * 2
    return math.atan(l / a) / math.pi * 180

if a * b / 2 > y:
    print(solve_triangle(a, b, y))

else:
    print(solve_trapezium(a, b, y))

Submission status: Accepted

Solution code:
import math

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

in1 = 2*(a*b-x/a)/(a**2)
in2 = a*(b**2)/(2*x)

ans1 = math.degrees(math.atan(in1))
ans2 = math.degrees(math.atan(in2))

if x > (a**2)*b/2:
    ans = ans1
else:
    ans = ans2

print(ans)

Submission status: Accepted

Solution code:
import math
PI = math.pi
EPS = 0.0000000001

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

def f(a, b, theta):
    # theta = pi/2-theta
    if a * math.tan(theta) <= b:
        return a * a * b - a * a * a * math.tan(theta) / 2
    else:
        return b * b / math.tan(theta) * a / 2


def solve():
    ok = PI / 2
    ng = 0.0
    for _ in range(100000):
        mid = (ok+ng) / 2
        if f(a, b, mid) < x:
            ok = mid
        else:
            ng = mid
    print(ok/PI*180)    

solve()

Submission status: Accepted

Solution code:
import math
PI = math.pi
EPS = 0.0000000001

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

def f(a, b, theta):
    if theta > PI / 2 - EPS:
        return 0.0
    ret = 0
    if a * math.tan(theta) <= b:
        return a * a * b - a * a * a * math.tan(theta) / 2
    else:
        return b * b / math.tan(theta) * a / 2


def solve():
    ok = PI / 2
    ng = 0.0
    for _ in range(100000):
        mid = (ok+ng) / 2
        if f(a, b, mid) < x:
            ok = mid
        else:
            ng = mid
    print(ok/PI*180)    

solve()

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
#あまりの体積を求める
y=a*a*b-x
#辺cを求める
c=(2*y)/(a*a)
#c>bなら台形
if c<=b:
    print(math.degrees(math.atan(c/a)))
else:
    c=(2*x)/(a*b)
    print(math.degrees(math.atan(b/c)))

Submission status: Accepted

Solution code:
import math

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

tmp = a*a*b/2

if a < b :
    if x <= tmp:
        ans = (a*b*b)/(2*x)
        print(math.degrees(math.atan(ans)))
    else:
        ans = (2*b)/a - (2*x)/(a*a*a)
        print(math.degrees(math.atan(ans)))
else:
    if x <= tmp:
        ans = (a*b*b)/(2*x)
        print(math.degrees(math.atan(ans)))
    else:
        ans = (2*b)/a - (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())
t=lambda y,x:math.atan2(y,x)/math.pi*180
print(t(b-x/a/a,a/2) if a*a*b/2<x else t(b,x*2/a/b))

Submission status: Accepted

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

import math

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

Submission status: Accepted

Solution code:
import numpy as np


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

    if a * a * b / 2.0 <= x:
        theta = np.arctan(2 * (a * a * b - x) / a**3)
    else:
        theta = np.pi / 2.0 - np.arctan(2 * x / (a * b * b))

    print(np.degrees(theta))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


class Solution:
    def solve(self, a: int, b: int, x: int) -> float:

        def vol(theta: float) -> float:
            t = math.tan(theta)

            if t > a/b:
                return (a**2)*b - (a**3)/2/t
            else:
                return a*(b**2)*t/2

        # almost full
        if abs(a*a*b - x) < 1e-8:
            return 0

        thetaLeft = 0
        thetaRight = math.pi/2 - 1e-8

        for i in range(100):
            thetaCenter = (thetaLeft + thetaRight)/2
            if vol(thetaCenter) < x:
                thetaLeft = thetaCenter
            else:
                thetaRight = thetaCenter

        return 90 - thetaLeft * 180 / math.pi


if __name__ == '__main__':

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

    # solve
    solution = Solution()
    print(solution.solve(a, b, x))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
import math

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


Vc = a*a*b/2



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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

taiseki = a * a * b

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

Submission status: Accepted

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

# 整数 > 整数型
def I(): return int(input())

# 整数列 '1 2 3 4' > 整数型リスト
def IsIl(): return list(map(lambda x: int(x), input().split()))

# 改行挟む整数列　'1/n 2/n 3/n' > 整数型りすと
def InIl(n): return [input() for i in range(n)]

# 整数列 '1 2' > 整数型タプル
def IsIt(): return map(lambda x: int(x), input().split())

# 改行挟む整数列　'1\n 2\n 3\n' > 整数型たぷる
def InIl(n): return map(input() for i in range(n))

# 文字列 'abcd' > 文字型リスト
def SsSl(): return list(map(lambda x: x, input()))

# 整数 '1234' > 整数型リスト

# 文字列 'aba' > 辞書（文字型:個数）{'a':2,'b':1}
def SSd():
    from collections import defaultdict
    A = input() # [int(i) for i in input().split()]
    dd=defaultdict(int)
    for a in A:
        dd[a]+=1
    return dd

import math

a,b,x=IsIt()

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