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:
#!/usr/bin/env python3
from math import pi, atan
a, b, x = map(int, input().split())
y = x / a
if y / b < a / 2:
    d = y / b
    th = pi / 2 - atan(2 * d / b)
else:
    d = y / a
    th = atan(2 * (b - d) / a)
print(th * 180 / pi)

Submission status: Accepted

Solution code:
import math
a,b,x = map(int,input().split())
A = 2*(a*a*b-x)
B = a*a*a
theta = math.atan(A/B)
if((b-a*math.tan(theta)) < 0): 
  theta = math.atan((a*b*b)/(2*x))
ans = math.degrees(theta)  
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
#import math
a,b,x=map(int, input().split())
x/=a
if a*b/2 == x:
    ang = np.arctan2(b, a)
    ang_deg = np.rad2deg(ang)
    print(ang_deg)
elif a*b/2 < x:
    emp=a*b-x
    emp_b=2*emp/a
    ang = np.arctan2(emp_b, a)
    ang_deg = np.rad2deg(ang)
    #ang=math.atan(a/emp_b)
    #ang_deg=math.degrees(ang)
    print(ang_deg)
else:
    full_a=2*x/b
    ang = np.arctan2(b, full_a)
    ang_deg = np.rad2deg(ang)
    #ang=math.atan(full_a/b)
    #ang_deg=math.degrees(ang)
    print(ang_deg)

Submission status: Accepted

Solution code:
a,b,x = list(map(int,input().split()))
from math import acos
from math import sqrt
from math import degrees
if (x/(a*a))*2 <= b:
    S = x/a
    y = 2*x/(a*b)
    c = sqrt(y*y + b * b)
    z = (b*b + c*c - y*y)/(2*c)
    theta = degrees(acos(z/b))
else:
    S = x/a
    y = (2*S)/a - b
    y = b - y
    c = sqrt(a * a + y * y)
    z = (y*y - a*a + c*c)/(2*c)
    if y == 0:
        y = 0.00000000001
    theta = degrees(acos(z/y))
print(90-theta)

Submission status: Accepted

Solution code:
import math

A = list(map(int, input().split()))

a = A[0]
b = A[1]
x = A[2]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

print(theta)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
from math import ceil, sqrt, atan, degrees

def solve():
    a,b,x = map(int, input().split())
    if a*a*b == x:
        return '0'
    elif 1/2*a*a*b >= x:
        t = atan(2*x/a/b/b)
    else:
        t = atan(a*a*a/2/(a*a*b-x))

    return str(90-degrees(t))
        
if __name__ == '__main__':
    print(solve())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import bisect
import sys
input = sys.stdin.readline

setrecursionlimit(1000000)

dp = defaultdict(lambda x:-1)

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

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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Submission status: Accepted

Solution code:
import math
def resolve():

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

# 45度より傾けても大丈夫な場合
if x < a*a*b / 2.0:
  # 底面の水に触れてる長さをhとする
  h = 2.0 * float(x) / (float(b) * float(a))
  rad = math.atan2(b, h)
else:
  # こぼれるぎりぎりの、傾ける反対側の面の水の触れていない長さをhとする
  h = 2.0 * (float(b) - float(x) / float(a*a))
  rad = math.atan2(h, a)

print(math.degrees(rad))

Submission status: Accepted

Solution code:
import math

def read():
    a, b, x = list(map(float, input().strip().split()))
    return a, b, x

def solve(a, b, x):
    s = x / a
    h = x / a / a
    if h * 2 <= b:
        rad = math.atan2(b * b, 2 * s)
        deg = math.degrees(rad)
    else:
        rad = math.atan2(2 * (b - h), a)
        deg = math.degrees(rad)
    return deg

if __name__ == '__main__':
    inputs = read()
    print("%.8f" % solve(*inputs))

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

Submission status: Accepted

Solution code:
def answerA():
    a, b = map(int, input().split())
    if a < 10 and b < 10:
        result = a * b
    else:
        result = -1

    print(result)


def answerB():
    def can_be_devided_by_1d(n):
        result = 'No'
        for i in range(1,10):
            floor, mod = divmod(n, i)
            if mod == 0 and floor < 10:
                result = 'Yes'
        return result

    n = int(input())
    print(can_be_devided_by_1d(n))


def answerC():
    def make_divisors(n):
        divisors = set()
        for i in range(1, int(n ** 0.5) + 1):
            if n % i == 0:
                divisors.add(i)
                if i != n // i:
                    divisors.add(n // i)
        return divisors

    n = int(input())
    divisors = make_divisors(n)
    candidates = set()

    for i in divisors:
        floor = n // i
        distance = (floor-1) + (i-1)
        candidates.add(distance)

    print(min(candidates))


import math

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

    bottom = a**2
    volume = bottom * b
    side = a * b

    if x < volume / 2:
        y = 2 * x / side
        radian = math.atan2(b, y)
    elif x > volume / 2:
        y = (2 * x - volume) / a ** 2
        h = b - y
        radian = math.pi / 2 - math.atan2(a, h)
    else:
        radian = math.atan2(b, a)

    print(math.degrees(radian))


if __name__ == '__main__':
    answer()

Submission status: Accepted

Solution code:
import math

def f(x):
   return 180 * math.atan(a * b**2 / (2 * x)) / math.pi

def g(x):
   return 90 - 180 * math.atan(a**3 / (2 * (a * a * b - x))) / math.pi

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

if a * a * b == x:
    print(0)
elif x <= a * a * b / 2:
    print(f(x))
else:
    print(g(x))

Submission status: Accepted

Solution code:
import math


a,b,x = [int(_) for _ in input().split()]
if x >= a*a*b/2:
    print(math.degrees(math.atan((a*a*b-x)*2/(a*a*a))))
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())

s = a * a
v_max = s * b
v_space = v_max - x

answer = 0

if v_space <= v_max // 2:
    height = v_space * 2 / s
    tan_theta = height / a
else:
    aa = x * 2 / (a * b)
    tan_theta = b / aa

answer = math.degrees(math.atan(tan_theta))
print(answer)

Submission status: Accepted

Solution code:
import sys
import math
from fractions import Fraction

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

y = Fraction(x / (a ** 2))

if y == b:
    print(0)
    sys.exit()

if b - 2 * y > 0:
    a = Fraction(2 * a * y / b)
    teihen = b
else:   
    teihen = 2 * (b - y)
res = Fraction(a / teihen)
print(90 - math.degrees(math.atan(res)))

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
if x/(a**2) > b/2:
    tang = 2*((a**2)*b-x)/(a**3)
    ans = math.degrees(math.atan(tang))
elif  x/(a**2) == b/2:
    tang = 1
    ans = math.degrees(math.atan(tang))
elif x/(a**2) < b/2:
    tang = a*(b**2)/(2*x)
    ans = math.degrees(math.atan(tang))

print(ans)

Submission status: Accepted

Solution code:
import math
a,b,X = map(float,input().split())
T = math.atan(a/b)
if X <= a**2*b/2.0:
    c = 2*X/(a*b**2)
    theta = 90.0 -math.atan(c)*180/math.pi
else:
    Y = a**2*b-X
    theta = math.atan(2*Y/a**3)*180/math.pi
print(theta)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a, b, x = na()
s = x/a
tri = a*b/2
if tri <= s:
    si = a * b - s
    print(math.degrees(math.atan(2 * si/a**2)))
else:
    print(90.0 - math.degrees(math.atan(2 * s/b**2)))

Submission status: Accepted

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

if a*a*b/2 >= x:
  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(rad * 180 / math.pi)

Submission status: Accepted

Solution code:
import math

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

novo=2*x/(a*b)

tangente=b/novo


res= math.atan(tangente)*180/(math.pi)

if novo<=a:
	print("%.10f" %(res))

else:
	novo=2*x/(a*a)-b
	tangente=(b-novo)/a
	
	res= math.atan(tangente)*180/(math.pi)
	print("%.10f" %(res))

Submission status: Accepted

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

if __name__ == "__main__":
    f_d()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

c = -2*(x-a*a*b)/(a*a)

if b-c>=0:
	theta = np.arctan2(c,a)
else:
	theta = np.arctan2(b,2*x/a/b,)

print(np.degrees(theta))

Submission status: Accepted

Solution code:
from math import atan, degrees
a, b, x = [int(i) for i in input().split()]
angle = None

if x <= a*a*b/2: # 液体が容器の容量の半分以下なら
    c = x/a/b*2
    angle = degrees(atan(b/c))
else:
    c = 2*x/a/a-b
    angle = degrees(atan((b-c)/a))

print(angle)

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
y=2*(b-x/a/a)
th=math.asin(y/math.sqrt(y*y+a*a))*180/math.pi
if th>math.asin(b/math.sqrt(b*b+a*a))*180/math.pi:
    y=2*x/a/b
    th=math.asin(b/math.sqrt(y*y+b*b))*180/math.pi
print(th)

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 permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

a,b,x=map(int,input().split())
if x<a*a*b//2:
    q=math.degrees(math.atan(a*b*b/(2*x)))
else:
    q=math.degrees(math.atan(2*(a*a*b-x)/(a**3)))
print('{:.10f}'.format(q))

Submission status: Accepted

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

if 2*x/(a**2) > b:
    c = b- (2*x/(a**2) - b)
    rad = math.acos(a/math.sqrt(c**2 + a**2))
    deg = math.degrees(rad)
    ans = deg
else:
    c = 2*x/a/b
    h = b * c / math.sqrt(b**2 + c**2)
    rad = math.acos(h/b)
    deg = math.degrees(rad)
    ans = deg
    
print(ans)

Submission status: Accepted

Solution code:
import math

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

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

print(ans)

Submission status: Accepted

Solution code:
from math import acos, degrees, sqrt

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

if(x == a * a * b / 2):
    print(degrees(acos(a / sqrt(a * a + b * b))))
elif(x < a * a * b / 2):
    a = (2 * x) / (a * b)
    print(degrees(acos(a / sqrt(a * a + b * b))))
else:
    z = 2 * (x - (a * a * b / 2)) / (a * a)
    b = b - z
    print(degrees(acos(a / sqrt(a * a + b * b))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

v = a * a * b

if 2 * x == v:
    print(math.degrees(math.atan2(a,b)))

elif 2 * x > v:
    print(math.degrees(math.atan2(2 * (v - x), a ** 3)))

else:
    w = v - x
    print(math.degrees(math.atan2(a * b * b, 2 * x)))

Submission status: Accepted

Solution code:
import math

A, B, X = map(int, input().split())
water = X / A # 水の面積
bottle = A * B # 水筒の面積
answer = 0
limit = A * B // 2
pour = bottle - water

if pour <= limit:
    answer = 90-math.degrees(math.atan2(A, pour * 2 / A))
else:
    answer = math.degrees(math.atan2(B, water * 2 / B))
print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

L = (a ** 2) * b

if L == x:
    print(0)
else:
    r = L - x
    if r <= L / 2:
        y = 2 * r / (a ** 2)
        print(math.degrees(math.acos(a / (math.sqrt(y ** 2 + a ** 2)))))
    else:
        y = 2 * x / (b * a)
        print(math.degrees(math.acos(y / (math.sqrt(y ** 2 + b ** 2)))))

Submission status: Accepted

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

if rest == 0:
    print(0)
    sys.exit()

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

# 箱の体積
V = (a**2) * b

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import os

input = sys.stdin.readline

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

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

Submission status: Accepted

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

Submission status: Accepted

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

height = x / (a ** 2)
side = a * height

if side <= a * b / 2:
    edge = side * 2 / b
    print(90 - math.degrees(math.atan(edge/b)))
else:
    edge = (a * b - side) * 2 / a
    print(math.degrees(math.atan(edge/a)))

Submission status: Accepted

Solution code:
import math
atan2 = math.atan2
pi = math.pi

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

# border
halfAB = A * A * B / 2

if X >= halfAB:
    X = A*A*B - X
    t = X*2 / A / A
    # print(t)
    resRad = atan2(t, A)
else:
    t = X*2 / A / B
    # print(t)
    resRad = atan2(B, t)

print(resRad * 180.0 / pi)

Submission status: Accepted

Solution code:
import math

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

t = a*a*b

if x == t:
    theta = 90
elif x <= t*0.5:
    tan = 2*x/(a*b*b)
    theta = math.degrees(math.atan(tan))
else:
    tan = a*a*a/(2*(a*a*b - x))
    theta = math.degrees(math.atan(tan))

print(90 - theta)

Submission status: Accepted

Solution code:
import numpy as np
A = list(map(int, input().split()))
under = A[0] ** 2
total = under * A[1]
if A[2] >= total // 2:
  b = (total - A[2]) * 2 / under
  print(90 * np.arctan(b / A[0]) / np.pi * 2)
else:
  under = A[2] * 2 / A[1]
  a = under / A[0]
  print(90 * np.arctan(A[1] / a) / np.pi * 2)

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

Submission status: Accepted

Solution code:
import math


import math

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

y = (2*x - (a*a*b))/(a*a)
# print(y)

if(y <= 0):
	y = (2*x)/(a*b)
	c = y/math.sqrt(b*b + y*y)
	print((math.acos(c))*(180/math.pi))

else:
	c = a/math.sqrt(a*a + (b-y)*(b-y))
	print((math.acos(c))*(180/math.pi))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

theta = math.degrees(math.atan(tan_theta))

print(theta)

Submission status: Accepted

Solution code:
import math

a, b, x = map(int, input().split())
if x < a**2 * b / 2:
    rad = math.pi / 2 - math.atan2(2 * x, a * b**2)
else:
    rad = math.atan2(2 * (a**2 * b - x), a**3)
deg = rad / math.pi * 180
print(deg)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
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 II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True
debug = False

def dprint(*objects):
    if debug == True:
        print(*objects)

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

    import math

    if (a*a*b)/2 <= x:
        dprint('a')
        ans = math.atan((2/a) * (b- (x/a**2)))
    else:
        ans = math.atan2(b, 2*x/(a*b))

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


solve()

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

threshold_volume = a * a * b / 2

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

Submission status: Accepted

Solution code:
import math

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

if a * a * b // 2 <= x:
	y = a * a * b - x
	h = y * 2 / a / a
	t = math.atan2(h, a)
else:
	h = x * 2 / a / b
	t = math.pi / 2 - math.atan2(h, b)

print(math.degrees(t))

Submission status: Accepted

Solution code:
import sys
from collections import deque,defaultdict
from fractions import gcd
from math import ceil,atan,degrees

def N():
    return int(sys.stdin.readline())
def NK():
    return map(int,sys.stdin.readline().split())
def LS_I():
    return [int(x) for x in sys.stdin.readline().split()]
def LS_S():
    return list(input())
def main():
    a,b,x = NK()
    x_ = x/a
    if x_<= a*b/2:
        x_ = 2*x_/b
        theta = degrees(atan(b/x_))
        print(theta)
    else:
        x_ = a*b-x_
        x_ = 2*x_/a
        theta = degrees(atan(x_/a))
        print(theta)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

v = a * a * b

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

elif x < v / 2:
    rad = math.atan(a * b * b / (2 * x))
    print(math.degrees(rad))


else:
    print(45)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

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

print(theta)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Oct 27 21:13:33 2019

@author: doppe
"""

import math

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

Submission status: Accepted

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

half = a*a*b*0.5

if x>half:
    tant = (a*a*b-x)/(0.5*a*a*a)
    theta = np.rad2deg(np.arctan(tant))
else:
    tant = (2*x)/(a*b*b)
    theta = np.rad2deg(np.arctan(tant))
    theta = 90-theta
    
print(theta)

Submission status: Accepted

Solution code:
import math

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

sita = 0

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

print(sita * (180.0 / math.pi))

Submission status: Accepted

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