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 bisect,collections,copy,itertools,math,string
import sys
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
def main():
    a,b,x = LI()
    ans = 0

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

Submission status: Accepted

Solution code:
from math import atan, degrees

def main():
    a, b, x = map(int, input().split())
    # xが多い場合：水が三角形になる前に溢れるパターン
    if (a**2*b) / 2 < x:
        # 水じゃないところが三角形 を area
        area = a * b - x/a
        c = 2 * area / a 
        # thetaが逆だから
        t = c / a
        ans = degrees(atan(t))
    else:
        # 面積で考えるので水の量/奥行き
        area = x / a
        c = 2 * area / b
        t = b / c
        ans = degrees(atan(t))
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

h=x/a/a
A=h*a

if A<=b*a/2:
    L=A/b*2
    ans=math.degrees(math.atan(b/L))
else:
    L=A*2/a-b
    ans=math.degrees(math.atan((b-L)/a))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

def get_angle_from_sides(a, b, c):
    return math.acos((a ** 2 + b ** 2 - c ** 2) / (2 * a * b))

def checkio(a, b, c):
    try:
        angles = [get_angle_from_sides(*abc) for abc in ((a, b, c), (b, c, a), (c, a, b))]
        result = sorted((math.degrees(a)) for a in angles)
        return [0, 0, 0] if 0 in result else result
    except ValueError:
        return [0, 0, 0]
count = 0
if y == x:
  pass
elif y/2 <=x:
  if a>=2*(b-h):
    m = checkio(a,2*(b-h),math.sqrt(a**2+(2*(b-h))**2))
    count = m[0]
  elif a<2*(b-h):
    m = checkio(a,2*(b-h),math.sqrt(a**2+(2*(b-h))**2))
    count = m[1]
elif y/2>x:
  z = 2*x/(a*b)
  if b>=z:
    m = checkio(b,z,math.sqrt(b**2+(z)**2))
    count = m[1]
  elif b<z:
    m = checkio(b,z,math.sqrt(b**2+(z)**2))
    count = m[0]
#print(a,2*(b-h),math.sqrt(a**2+2*(b-h)**2),m)
print(count)

Submission status: Accepted

Solution code:
import sys
from math import *

input = sys.stdin.readline

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

s = x / a


if s > a*b / 2:
    sankaku = a*b - s
    h = (a*b - s) * 2 / a 
    print(degrees(atan(h/a)))
else:
    w = 2*s/b
    print(degrees(atan(b/w)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 参考:https://drken1215.hatenablog.com/entry/2020/04/26/193500 #
from math import pi
from math import atan2
a,b,x = map(int,input().split())
x /= a
if x > a * b / 2:
    print(atan2(2 * (a * b - x),(a ** 2)) * 180 / pi)
if x <= a * b / 2:
    print(atan2((b ** 2),2 * x) * 180 / pi)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Sep  9 19:58:50 2020

@author: liang
"""
"""
【三角形の面積の公式】
S = 1/2 * a * b
"""
import math
a, b, x = map(int, input().split())
L = math.sqrt((x/a/b)**2 + b**2)
if x >= a**2*b/2:
    ans = math.degrees(math.atan((b-x/a**2)/a*2))
else:
    ans = math.degrees(math.atan((a*b**2)/x/2))
    #ans = math.degrees(math.asin(b/L))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from sys import exit
from collections import deque
from bisect import bisect_left, bisect_right, insort_left, insort_right #func(リスト,値)
from heapq import heapify, heappop, heappush
from itertools import product, permutations, combinations, combinations_with_replacement
from functools import reduce
from math import sin, cos, tan, asin, acos, atan, degrees, radians

sys.setrecursionlimit(10**6)
INF = 10**20
eps = 1.0e-20
MOD = 10**9+7

def lcm(x,y):
    return x*y//gcd(x,y)
def lgcd(l):
    return reduce(gcd,l)
def llcm(l):
    return reduce(lcm,l)
def powmod(n,i,mod):
    return pow(n,mod-1+i,mod) if i<0 else pow(n,i,mod)
def div2(x):
    return x.bit_length()
def div10(x):
    return len(str(x))-(x==0)
def perm(n,mod=None):
    ans = 1
    for i in range(1,n+1):
        ans *= i
        if mod!=None:
            ans %= mod
    return ans
def intput():
    return int(input())
def mint():
    return map(int,input().split())
def lint():
    return list(map(int,input().split()))
def ilint():
    return int(input()), list(map(int,input().split()))
def judge(x, l=['Yes', 'No']):
    print(l[0] if x else l[1])
def lprint(l, sep='\n'):
    for x in l:
        print(x, end=sep)
def ston(c, c0='a'):
    return ord(c)-ord(c0)
def ntos(x, c0='a'):
    return chr(x+ord(c0))
class counter(dict):
    def __init__(self, *args):
        super().__init__(args)
    def add(self,x):
        self.setdefault(x,0)
        self[x] += 1
class comb():
    def __init__(self, n, mod=None):
        self.l = [1]
        self.n = n
        self.mod = mod
    def get(self,k):
        l,n,mod = self.l, self.n, self.mod
        k = n-k if k>n//2 else k
        while len(l)<=k:
            i = len(l)
            l.append(l[i-1]*(n+1-i)//i if mod==None else (l[i-1]*(n+1-i)*powmod(i,-1,mod))%mod)
        return l[k]

a,b,x = mint()
if 2*x>a*a*b:
    h = 2*(a*a*b-x)/(a*a)
    print(degrees(atan(h/a)))
else:
    h = 2*x/(a*b)
    print(degrees(atan(b/h)))

Submission status: Accepted

Solution code:
def main():
    import sys
    readline = sys.stdin.buffer.readline

    import math

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan2, degrees

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

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

Submission status: Accepted

Solution code:
import math
def at(n):
	return math.degrees(math.atan(n))

def main():
	a, b, x = [int(p) for p in input().split(" ")]
	V = a * a * b
	if x < V / 2:
		print(at(a * b * b / (2 * x)))
	else:
		print(at(2*(a*a*b-x)/a**3))

main()

Submission status: Accepted

Solution code:
import math


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


a, b, x = LI()
if x == (a**2*b)/2:
    ans = 45
elif x > (a**2*b)/2:
    ans = math.degrees(math.atan((2*(b-x/(a**2)))/a))
else:
    ans = math.degrees(math.atan(a*b**2/(2*x)))
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

import math
p = math.atan(t)
p = math.degrees(p)
print(p)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

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

    print(math.degrees(ans))


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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


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


l=0
r=90
while r-l>=10**-6:
  mid=(l+r)/2
  #print(mid,f(a,b,mid))
  if x-10**-6<=f(a,b,mid)<=x+10**-6:
    print(mid)
    exit(0)
  if f(a,b,mid)>x:
    l=mid
  else:
    r=mid
print(l)

Submission status: Accepted

Solution code:
from math import atan, degrees

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

Submission status: Accepted

Solution code:
from math import atan, degrees

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

Submission status: Accepted

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

import math
r = 180/math.pi

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

Submission status: Accepted

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

Submission status: Accepted

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


def is_ok(theta):
    if math.tan(theta) * b < a:
        return x <= math.tan(theta) * b * b / 2
    else:
        p = a/math.tan(theta)
        return x <= a*p/2+a*(b-p)


def bisect(ng, ok):
    while (abs(ok - ng) > 1e-9):
        mid = (ok + ng) / 2
        if is_ok(mid):
            ok = mid
        else:
            ng = mid
    return ok


ans = bisect(0, math.pi)
ans = 90- ans * 180 / math.pi
print(ans)

Submission status: Accepted

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

if sq >= x:
    A1 = 2*x/(a*b)
    num = math.atan(b/A1)
else:
    B1 = 2*x/a**2 - b
    num = math.atan((b-B1)/a)

print(math.degrees(num))

Submission status: Accepted

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

Submission status: Accepted

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    import math
    mod=10**9+7
    a,b,x3=MI()
    
    x=x3/(a**2) #引数勘違いしてた
    
    if (a*b)//2 >= a*x :
        y=(2*a*x)/b
        th=math.atan2(b,y)
        
    else:
        rem=a*(b-x)
        z=rem*2/a
        th=math.atan2(z,a)
        
    print(th/math.pi * 180)
        

main()

Submission status: Accepted

Solution code:
from math import atan, degrees

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

Submission status: Accepted

Solution code:
import math
from math import gcd,pi,sqrt
INF = float("inf")

import sys
sys.setrecursionlimit(10**6)
import itertools
from collections import Counter,deque
def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]

def main():
    a,b,x = i_map()
    if a*a*b<x*2:
        water_y = x/a**2
        left_y = b-water_y
        half_x = a/2
        d = math.degrees(math.atan(left_y/half_x))
        print(d)
    else:
        c = (x*2)/(a*b)
        c = math.degrees(math.atan(b/c))
        print(c)


if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
import math

def main():
    a, b, x = map(int, input().split())
    if a*a*b == x:
        print(0)
        return
    mid = a**2*b/2
    c = x/(a**2)
    if mid == x:
        ans = 90 - math.degrees(math.atan(a/b))
    elif mid < x:
        d = 2*x/(a**2) - b
        ans = 90 - math.degrees(math.atan(a/(b-d)))
    else:
        d = 2*a*c/b
        ans = 90 - math.degrees(math.atan(d/b))

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 問題: https://atcoder.jp/contests/abc144/tasks/abc144_d

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math        # factorical（階乗) # hypot(距離)
# import heapq
# from fractions import gcd # Python3.5以前 # lcm（最小公倍数） = (a*b)//gcd(a,b)
# from fractions import Fraction
# from math import gcd # Python3.6以降
# --------------------------------------------------------------

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# D - Water Bottle

from math import atan, degrees

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_d

from math import pi, tan, atan, degrees

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

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

if b * tan(pi * 0.5 - theta) <= a:
    print(degrees(theta))

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
from bisect import bisect_left, bisect_right
from functools import reduce, lru_cache
from heapq import heappush, heappop, heapify

import itertools
import math, fractions
import sys, copy

def L(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline().rstrip())
def SL(): return list(sys.stdin.readline().rstrip())
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def LIR1(n): return [LI1() for _ in range(n)]
def SR(n): return [SL() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
def LR(n): return [L() for _ in range(n)]

def perm(n, r): return math.factorial(n) // math.factorial(r)
def comb(n, r): return math.factorial(n) // (math.factorial(r) * math.factorial(n-r))

def make_list(n, *args, default=0): return [make_table(*args, default=default) for _ in range(n)] if len(args) > 0 else [default for _ in range(n)]

alphabets = "abcdefghijklmnopqrstuvwxyz"
ALPHABETS = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007
INF = float("inf")

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc144/tasks/abc144_d

from math import pi, tan

a, b, x = map(int, input().split())
eps = 10e-8

def f(a, b, theta):
    if theta > pi / 2.0 - eps:
        return 0.0
    ret = 0.0
    if a * tan(theta) <= b:
        ret = a * a * b - a * a * a * tan(theta) / 2.0
    else:
        ret = b * b / tan(theta) * a / 2.0
    return ret

ng = 0.0
ok = pi / 2.0
for _ in range(100000):
    mid = (ok + ng) / 2.0
    if f(a, b, mid) < x:
        ok = mid
    else:
        ng = mid
print("{:.10f}".format(ok / pi * 180))

Submission status: Accepted

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

S = a*b
s = x/a
if s == S:
  print(0)

elif s >= S/2:
  em_s = S-s
  tan = (a**2)/(2*em_s)
  ans = math.degrees(math.atan(tan))
  print(90-ans)

else:
  tan = (2*s)/(b**2)
  ans = math.degrees(math.atan(tan))
  print(90-ans)

Submission status: Accepted

Solution code:
# import itertools
import math
# import sys
# sys.setrecursionlimit(500*500)
# import numpy as np

# N = int(input())
# S = input()
# n, *a = map(int, open(0))
a, b, x = map(int, input().split())
# A = list(map(int, input().split()))
# B = list(map(int, input().split()))
# tree = [[] for _ in range(N + 1)]
# B_C = [list(map(int,input().split())) for _ in range(M)]

# B_C = sorted(B_C, reverse=True, key=lambda x:x[1])
# all_cases = list(itertools.permutations(P))
# a = list(itertools.combinations_with_replacement(range(1, M + 1), N))
# itertools.product((0,1), repeat=n)

# A = np.array(A)
# cum_A = np.cumsum(A)
# cum_A = np.insert(cum_A, 0, 0)

# def dfs(tree, s):
#     for l in tree[s]:
#         if depth[l[0]] == -1:
#             depth[l[0]] = depth[s] + l[1]
#             dfs(tree, l[0])
# dfs(tree, 1)

# def factorization(n):
#     arr = []
#     temp = n
#     for i in range(2, int(-(-n**0.5//1))+1):
#         if temp%i==0:
#             cnt=0
#             while temp%i==0:
#                 cnt+=1
#                 temp //= i
#             arr.append([i, cnt])
#     if temp!=1:
#         arr.append([temp, 1])
#     if arr==[]:
#         arr.append([n, 1])
#     return arr

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

Submission status: Accepted

Solution code:
'''
Created on 2020/08/27

@author: harurun
'''
def main():
  import math
  import sys
  pin=sys.stdin.readline
  pout=sys.stdout.write
  perr=sys.stderr.write
  
  a,b,x=map(int,pin().split())
  if 2*x>a*a*b:
    print(math.degrees(math.atan((2*b*a*a-2*x)/(a*a*a))))
  else:
    print(math.degrees(math.atan(a*b*b/(2*x))))
  return 

main()

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

Submission status: Accepted

Solution code:
import math

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

s = x / a

if s >= a * b / 2:
    h = (a * b - s) * 2 / a
    rad = math.atan2(h, a)
else:
    w = s * 2 / b
    rad = math.atan2(b, w)

print(rad / (2 * math.pi) * 360)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
x = x / a
if x >= a*b/2:
  K = (a*b - x)/a*2
  L = K/math.sqrt(K**2+a**2)
  ans = math.degrees(math.asin(L))
  print(ans)
else:
  K = 2*x/b
  L = b/math.sqrt(K**2+b**2)
  ans = math.degrees(math.asin(L))
  print(ans)

Submission status: Accepted

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

import math
if x <= ((a ** 2) * b) / 2:
    n = 2 * x / (a * b)
    ans = math.acos(n / (math.sqrt(b ** 2 + n ** 2)))
else:
    n = 2 * b - (2 * x / (a ** 2))
    ans = math.acos(a / math.sqrt(a ** 2 + n ** 2))

print(math.degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
import re
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def v(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

a,b,x = I()

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

print(math.degrees(math.atan(c)))

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
from math import degrees, atan

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

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

print(degrees(atan(c)))

Submission status: Accepted

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

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

    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

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

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**2))*180/math.pi)

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def resolve():
    a, b, x = map(int, input().split())
    met = a ** 2 * b / 2
    if x > met:
        y = 2 * b - 2 * x / a**2
        ans = math.atan2(y, a)
    elif x == met:
        ans = math.pi / 4
    else:
        y = 2 * x / a / b
        ans = math.pi / 2 - math.atan2(y, b)

    print(math.degrees(ans))
    
resolve()

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

if x > a * a * b / 2:
    h = 2 * x / (a * a) - b
    ans = atan((b - h) / a)
else:
    h = 2 * x / (a * b)
    ans = pi / 2 - atan(h/b)

ans *= 180 / pi
print("{:.12f}".format(ans))

Submission status: Accepted

Solution code:
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
import math

ans = 0
a, b, x = map(int, input().split())
S = x / a
if S >= (a * b / 2):
    h = ((a * b - S) * 2) / a
    deg = math.atan2(h, a) / (math.pi * 2) * 360
else:
    w = 2 * S / b
    deg = math.atan2(b, w) / (math.pi * 2) * 360
print(deg)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 20-08-12 再トライ
from math import degrees, atan2

a, b, x = [int(x) for x in input().split()]
if x <= a ** 2 * b / 2:
    ans = degrees(atan2(a * b ** 2, 2 * x))
else:
    ans = degrees(atan2(2 * a ** 2 * b - 2 * x, a ** 3))

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

vol = a*a*b

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

print(math.degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)