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

Submission status: Accepted

Solution code:
from math import atan, pi

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

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

Submission status: Accepted

Solution code:
import math

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

V = a*a*b

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
  a, b, x = map(int, input().split())
  vm = a*a*b
  if x==vm:
    return 0
  elif x>vm/2:
    return 90-math.degrees(math.atan(a**3/(2*(vm-x))))
  else:
    return 90-math.degrees(math.atan(2*x/(a*b*b)))

if __name__ == '__main__':
  import math
  print(main())

Submission status: Accepted

Solution code:
import math

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

vol = a**2 * b
ans = 0
if vol/2 < x:
    #print("水多し、台形になる")
    h0 = x/(a**2)
    c = 2*h0 - b
    ans = math.degrees(math.atan((b-c)/a))
else:
    #print("水少ない、三角形になる")
    d = (2*x)/(b*a)
    ans = math.degrees(math.atan(b/d))
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [input() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [int(input()) for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def roundUp(a, b):
        return -(-a // b)

    @staticmethod
    def toUpperMultiple(a, x):
        return Math.roundUp(a, x) * x

    @staticmethod
    def toLowerMultiple(a, x):
        return (a // x) * x

    @staticmethod
    def nearPow2(n):
        if n <= 0:
            return 0
        if n & (n - 1) == 0:
            return n
        ret = 1
        while(n > 0):
            ret <<= 1
            n >>= 1
        return ret

    @staticmethod
    def sign(n):
        if n == 0:
            return 0
        if n < 0:
            return -1
        return 1

    @staticmethod
    def isPrime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True


class PriorityQueue:
    def __init__(self, l=[]):
        self.__q = l
        heapq.heapify(self.__q)
        return

    def push(self, n):
        heapq.heappush(self.__q, n)
        return

    def pop(self):
        return heapq.heappop(self.__q)


sys.setrecursionlimit(1000000)
MOD = int(1e09) + 7
INF = int(1e30)


def main():
    # sys.stdin = open("Sample.txt")
    a, b, x = Scanner.map_int()
    S = x / a

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

men = x/a
ans = 0

if men >= 0.5*a*b:
    ans = math.degrees(math.atan(2*(a*b-men)/(a*a)))
else:
    ans = 90 - math.degrees(math.atan(2*men/(b*b)))

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 = 2*(a*b-S)/a
    print(math.degrees(math.atan2(h,a)))
else:
    h = 2*S/b
    print(math.degrees(math.atan2(b,h)))

Submission status: Accepted

Solution code:
import math
A, B, X = list(map(int, input().split()))

if X > (A*A*B)/2:
    #Trapezoid
    C = (X/A*2)/A-B
    print(math.degrees(math.atan((B-C)/A)))

else:
    #Triangle
    H = (X/A*2)/B
    print(math.degrees(math.atan(B/H)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

bottle = a * b
water = x / a

if water <= bottle / 2:
  a2 = 2 * water / b
  ans = math.degrees(math.atan(b / a2))
  
else:
  if x == a * b:
    ans = 90
  else:
    b2 = 2 * water / a - b
    water2 = water - (b2 * a)
    b3 = 2 * water2 / a
    ans = math.degrees(math.atan(b3 / a))
  
print(ans)

Submission status: Accepted

Solution code:
from math import atan, degrees

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

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

print(degrees(theta))

Submission status: Accepted

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

import math

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

Submission status: Accepted

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

Submission status: Accepted

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

from math import tan, degrees, pi

def main():
  a, b, x = map(int, input().strip().split())
  x /= a
  def bs(ltheta, rtheta):
    middle = (rtheta + ltheta) / 2
    if b - a * tan(middle) >= 0:
      v = a * (b - 0.5 * a * tan(middle))
    else:
      v = 0.5 * b * b / tan(middle)
      
    if abs(rtheta - ltheta) < 10**(-9) or v == x :
      return middle  
    if v > x:
      return bs(middle, rtheta)
    else:
      return bs(ltheta, middle)
  print(degrees(bs(0, pi/2)))

if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
import math
s = input()
ss = s.split(" ")
a = int(ss[0])
b = int(ss[1])
x = int(ss[2])

x = x/a

if(x == a*b/2):
    print("{0:.6f}".format(45))
    
elif(x > a*b/2):
    y = a*b - x
    c = y*2/a
    v = math.degrees(math.atan(c/a))
    print("{0:.6f}".format(v))
    
else:
    c = 2*x/b
    v = 90 - math.degrees(math.atan(c/b))
    print("{0:.6f}".format(v))

Submission status: Accepted

Solution code:
import math
p = list(map(int, input().split()))
a = p[0]
b = p[1]
x = p[2]

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

Submission status: Accepted

Solution code:
from math import atan


def find_angle(width, height, vol):
    area = vol/width
    if area > 1/2 * width * height:
        return atan(2*(width * height - area)/(width**2))
    else:
        return atan(height**2/(2*area))


a, b, x = [int(i) for i in input().split()]
print(find_angle(a, b, x) / (2*3.1415926535) * 360)

Submission status: Accepted

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

s = x / a

if s * 2 >= a * b:
  k = (2 * a * b - 2 * s) / a
  r = math.atan(k / a)
  print(math.degrees(r))

else:
  k = (2 * s) / b
  r = math.atan(b / k)
  print(math.degrees(r))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
#17:51
a,b,x = map(int,input().split())
x /= a
import math
if a * b >= 2 * x:
  c = 2*x/b
  t = math.atan(b/c) * 360 / (2*math.pi)
  print(t)
else:
  #print(x)
  c = 2*b - 2*x/a
  #print(c)
  t = math.atan(c/a) * 360 / (2*math.pi)
  print(t)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
if a * a * b / 2 < x:
    y = 2 * b - (2 * 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())

left = 0
right = (1/2)*math.pi
ret = left
eps = 10**(-7)
eeps = 10**(-9)

def calc_area(t):
    if t < math.atan(b/a):
        base_area = a*b
        upper = a*a*( math.tan(t) )/2
        area = base_area-upper
    else: 
        area = b*b*( math.tan(t)**(-1) )/2
    
    return area*a

ret = (right+left)/2

while True:
    diff = calc_area(ret)-x
    # print(ret*(180/math.pi), calc_area(ret),left, right, diff)
    if abs(diff) < eps: break
    
    if diff < 0:
        right = ret
    else:
        left = ret
        
    ret = (right+left)/2

print(ret*(180/math.pi))

Submission status: Accepted

Solution code:
# 実装と発想がむずいにぶたん
# というか最初は誰でもO(1)を考えるよなこれ にぶたんはむしろ少数派では
# （実際ほかの解答を見たらみーーーんなatan使ってるし）
# でもこれを見た瞬間やるだけと言ってるヒトはちょっとよくわからん

import math

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

l, r = 0.0, 90.0
if a * b / 2.0 > (x / a):
    # 半分未満の場合
    while l + 10 ** (-8) < r:
        theta = (l + r) / 2.0
        # 限界まで傾けたときの筒を横から見た時、水の入ってる部分はbを対辺とする直角三角形で、底辺をeとすると
        # tan(theta) = b / e -> e = b / tan(theta)
        # よって面積は (e * b)/2 -> (b/tan(theta)*b)/2
        e = b / math.tan(math.radians(theta))
        s2 = (e * b) / 2.0
        # 比較すべきは台形じゃなくてx/aだった
        if s2 > (x / a):
            l = theta
        else:
            r = theta
else:
    # 半分以上の場合
    while l + 10 ** (-8) < r:
        theta = (l + r) / 2.0
        # 限界まで傾けたときの筒を横から見た時、水の入っていない部分が直角三角形になる
        # 底辺がaなので、対辺をeとすると、tan(theta) = e/a -> e = a * tan(theta)
        # なので三角形の面積は (a * tan(theta) * a)/ 2
        # 同じくラジアンに変換して渡す
        s2 = (a * math.tan(math.radians(theta)) * a) / 2.0
        if (x / a) + s2 < a * b:
            l = theta
        else:
            r = theta
print(l)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,math

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	a,b,x =MI()
	V = a*a*b
	if(V*0.5 >= x):
		t=2*x/(a*b)
		ans = 90 -math.degrees(math.atan(t/b))
	else:
		t=(2*x-(a**2)*b)/(a**2)
		t=b-t
		ans = math.degrees(math.atan(t/a))
	print(ans)
main()

Submission status: Accepted

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

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

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, atan, degrees
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import math


def main():
    a, b, x = [int(x) for x in input().split()]
    area = x / a
    if area < a*b/2:
        theta = math.pi/2 - math.atan(2*area/b/b)
    else:
        theta = math.atan((2*b-2*area/a)/a)
    theta_deg = math.degrees(theta)
    print(theta_deg)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

ans = 0
if a * a * b / 2.0 <= 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))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math as mt
a,b,x = [int(i) for i in input().rstrip().split(' ')]
m = x/a
if m >= a*b/2:
    T = mt.degrees(mt.atan(2*(a*b - m)/(a*a)))
else:
    T = mt.degrees(mt.atan(b*b/m*0.5))
print(T)

Submission status: Accepted

Solution code:
from math import atan2, pi

def solve(a, b, x):
    if a * a * b <= 2 * x:
        return 90 - atan2(a / 2, b - x / a / a) / pi * 180
    else:
        return 90 - atan2(2 * x / a / b, b) / pi * 180

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

Submission status: Accepted

Solution code:
a,b,x = map(int,input().split())
import numpy as np
if x<=(a*a*b)/2:
    A = 2*x/(a*b*b)
    Z = A
    print(90-np.arctan(Z)*180/(np.pi))
else:
    A = 2*a*a*b-2*x
    B = A/(a*a*a)
    Z = B
    print(np.arctan(Z)*180/np.pi)

Submission status: Accepted

Solution code:
import math

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

if x / a <= a * b / 2:
  ad = 2 * x/(a * b)
  l = (b ** 2 + ad ** 2) ** 0.5
  res = math.degrees(math.acos(ad/l))
else:
  ad = (a * b - x / a) * 2 / a
  l = (a ** 2 + ad ** 2) ** 0.5
  res = 90 - math.degrees(math.acos(ad/l))
  
print(res)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math
import sys
a,b,x = map(int,input().split())
if a*a*b == x:
    print(0)
    sys.exit()
tan = a**3/(2*(a**2*b-x))
if tan<=(a/b):
    tan = 2*x/(b**2*a)
rad = math.atan(tan)
deg= 90- (rad * 180/math.pi)
print(deg)

Submission status: Accepted

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

import math

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

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

print(90-math.degrees(theta))

Submission status: Accepted

Solution code:
import math

EPS = 0.0000000001
PI = math.pi


def f(a, b, theta):
    if theta > PI / 2.0 - EPS:
        return 0.0

    if a * math.tan(theta) <= b:
        ret = a * a * b - a * a * a * math.tan(theta) / 2.0
    else:
        ret = b * b / math.tan(theta) * a / 2.0
    return ret


a, b, x = map(int, input().split())
ok = PI / 2.0
ng = 0.0
for i in range(1, 100001):
    mid = (ok + ng) / 2.0
    if f(a, b, mid) < x:
        ok = mid
    else:
        ng = mid
print(ok / PI * 180)

Submission status: Accepted

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

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

print(math.degrees(theta))

Submission status: Accepted

Solution code:
import math
import os
import sys
# from fractions import gcd
input = sys.stdin.readline

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7


def main():
    a, b, x = list(map(int, input().split()))
    area = x / a
    h = area / a
    remain = b - h
    if h >= b / 2:
        print(math.degrees(math.atan2(remain, a / 2)))
    else:
        a_dash = (2 * area) / b
        print(math.degrees(math.atan2(b, a_dash)))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# 二分法

import math

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

l = 0
r = math.pi/2



while r-l>10**(-10):
    z = (l+r)/2
    if b*math.tan(z)>a:
        flag = b*a**2-a**3/2/math.tan(z) > x
    else:
        flag = a*b**2*math.tan(z)/2 > x
    if flag:
        r = z
    else:
        l = z

print(90-math.degrees(l))

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
def f(t):
    t = math.radians(t)
    if a * math.tan(t) <= b:
        return a**2 * b - a**3 * math.tan(t) / 2
    else:
        return b**2 / math.tan(t) * a / 2
tmax = 90
tmin = 0
while True:
    tmid = tmin + (tmax-tmin) / 2
    if abs(f(tmid)-x) <= 10**(-9):
        break
    if f(tmid) < x:
        tmax = tmid
    else:
        tmin = tmid
print(tmid)

Submission status: Accepted

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

x /= a

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

Submission status: Accepted

Solution code:
import math

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

v = a * a * b
u = v - x

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, pi

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

res = 0

if a * a * b / 2.0 <= x:
    res = atan(2 * (a * a * b - x) / (a * a * a))
else:
    res = pi / 2 - atan(2 * x / (a * b * b))

print(res * 180.0 / pi)

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

Submission status: Accepted

Solution code:
from math import atan, degrees

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

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

print(degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
#theta傾いているときの最大容量
def f(theta):
    if math.tan(theta)<b/a:
        #あまり傾いてないとき
        return (a*b-((a*a*math.tan(theta))/2))*a
    else:
        return (b*b/math.tan(theta)/2)*a
low=0
high=math.pi/2
while(high-low>1e-15):
    mid=(low+high)/2
    #print(low,high,f(mid),x)
    if f(mid)>x:
        low=mid
    else:
        high=mid
print(math.degrees(low))

Submission status: Accepted

Solution code:
from math import *

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

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

Submission status: Accepted

Solution code:
from math import atan
from math import degrees

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

S = a**2*b

# 満タンの場合
if S==x:
    theta = math.pi/2

# 半分以下の場合（水平に近い状態でこぼれる）
elif S/2 < x:
    theta = math.atan(a**3/(2*(S-x)))

# 半分以上の場合（垂直に近い状態でこぼれる）
else:
    theta = math.atan(2*x/(a*b**2))    
    
print(90-math.degrees(theta))

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import bisect

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

def LI(): return list(map(int, sys.stdin.readline().split()))

a,b,x = LI()

water_area = x / a
if water_area >= (a * b / 2):
    b_ = (a * b - water_area) * 2 / a
    theta = math.degrees(math.atan(b_ / a))
else:
    a_ = (water_area * 2 / b)
    theta_ = math.degrees(math.atan(a_ / b))
    theta = 90 - theta_
print(theta)

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    a,b,x = LI()
    t = x / (a**2)
    if t*2 >= b:
        return abs(math.degrees(math.atan2(b-t,a/2)))

    c = x / a / b * 2
    return abs(math.degrees(math.atan2(b,c)))


print(main())

Submission status: Accepted

Solution code:
from math import tan, degrees, cos, sin, atan
a, b, x = map(int, input().split())
x = x/(a**2)

if x < b/2:
  alpha = degrees(atan((b**2)/(2*a*x)))
elif x > b/2:
  alpha = degrees(atan((2*b - 2*x)/a))
else:
  alpha = degrees(atan(b/a))

print(alpha)

Submission status: Accepted

Solution code:
from math import tan, degrees, cos, sin, atan
a, b, x = map(int, input().split())
x = x/(a**2)

if x < b/2:
    alpha = degrees(atan((b**2)/(2*a*x)))
elif x > b/2:
    alpha = degrees(atan((2*b - 2*x)/a))
else:
    alpha = degrees(atan(b/a))

print(alpha)

Submission status: Accepted

Solution code:
import math

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

def calc(theta):
    h = math.tan(theta) * a
    if h <= b:
        s = 1 / 2 * a * a * h
    else:
        c = h - b
        s = 1 / 2 * a * a * h
        s = s - s * ((c / h) ** 2)
    return s

l, r = 0.0, math.pi / 2
while abs(r - l) > 1e-12:
    m = (l + r) / 2
    rem = a * a * b - calc(m)
    if rem >= x:
        l = m
    else:
        r = m
print(l * 180 / math.pi)

Submission status: Accepted

Solution code:
import math
def ints():
  return [int(x) for x in input().split()]
def ii():
  return int(input())

a, b, x = ints()
x /= a

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


def calc(t):
    t = math.radians(t)
    if a * math.tan(t) <= b:
        return a * a * b - a * a * a * math.tan(t) / 2
    else:
        return b * b / math.tan(t) * a / 2


a, b, x = map(int, input().split(" "))
n_max = 90
n_min = 0
for _ in range(100000):
    n_mid = n_min + (n_max - n_min) / 2
    if calc(n_mid) < x:
        n_max, n_min = n_mid, n_min
    else:
        n_max, n_min = n_max, n_mid
print(n_mid)

Submission status: Accepted

Solution code:
from math import atan as arctan
from math import degrees


def main():
    a, b, x = map(int, input().split(" "))
    bottom_area = x / a
    if bottom_area >= a * b / 2:
        print(abs(degrees(arctan((2 * x / (a ** 3)) - (2 * b / a)))))
    else:
        print(90 - degrees(arctan(2 * x / a / (b ** 2))))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

def check(t):
    if t < atan(b/a):
        s = a*a*b - a*a*a*tan(t)/2
    else:
        s = a*b*b/tan(t)/2
    return x<s

ok = 0
ng = pi/2

while ng-ok>10**-8:
    mid = (ok+ng)/2
    if check(mid):
        ok = mid
    else:
        ng = mid

print(ok*180/pi)

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
    radian = math.atan2(h, a)
    angle = math.degrees(radian)
    print(angle)
else:
    h = 2 * s / b
    radian = math.atan2(b, h)
    angle = math.degrees(radian)
    print(angle)

Submission status: Accepted

Solution code:

import math
import fractions

def makeDivisors(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 bitlist(x,digit):
    res = [0 for i in range(digit)]
    now = x
    for i in range(digit):
        res[i]=now%2
        now = now >> 1
    return res

def makeNeighbor(es,n):
    nlist = [[] for i in range(n+1)]
    for i in es:
        nlist[i[0]].append(i[1])
        nlist[i[1]].append(i[0])
    return nlist
    
#a = list(map(int, input().split()))
# --------------------------------------------

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

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