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

Submission status: Accepted

Solution code:
import sys
from math import *

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline

def main():
    a, b, x = map(int, input().split())
    h = x / a / a
    if h == b:
        print(0)
    elif h >= b / 2:
        c = (b - h) * 2
        print(degrees(atan(c / a)))
    else:
        c = 2 * a * h / b
        print(degrees(atan(b / c)))

main()

Submission status: Accepted

Solution code:
from math import atan2, degrees

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

if a * a * b == x:
    print(0)
    exit()
elif a * a * b / 2 <= x:
    z = a * b - (x / a)

    y = (z / a) * 2

    #print(z, y)

    print(degrees(atan2(y, a)))
else:
    print(degrees(atan2(b, (x/a) * 2 / b)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def bisection(l,r,f,left=True,discrete=True):
    eps=1 if discrete else 10**-12
    if((not left)^f(r)): return r if left else r+1
    elif(left^f(l)): return l-1 if left else l
    while(r-l>eps):
        h=(l+r)//2 if discrete else (l+r)/2
        if((not left)^f(h)): l=h
        else: r=h
    return (l+r)/2 if not discrete else l if left else r

def resolve():
    from math import tan,pi
    a,b,x=map(int,input().split())
    def check(t):
        if(2*x<=a*a*b):
            return 2*x*tan(t)<=a*b*b
        else:
            return 2*x<=a*a*(2*b-a*tan(t))
    print(bisection(0,pi/2-10**-6,check,left=True,discrete=False)*180/pi)
resolve()

Submission status: Accepted

Solution code:
#設定
import sys
input = sys.stdin.buffer.readline

import math
#ライブラリインポート
from collections import defaultdict

INF = float("inf")

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

#処理内容
def main():
	a, b, x = getlist()
	if 2 * x >= (a ** 2) * b:
		ans = (2 * (a ** 2) * b - 2 * x) / (a ** 3)
		ans = math.atan(ans)
		ans = math.degrees(ans)
		print(ans)
	else:
		m = 2 * x / (a * b)
		ans = math.atan(m / b)
		ans = math.degrees(ans)
		print(90 - ans)

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
import math

def main():
  a, b, x = map(int, input().split())
  box = a * a * b
  fill_rate = x / box
#  print("fill_rate:",fill_rate)
  if fill_rate > 0.5:
    height = b * (1 - fill_rate)
#    print("height:",height)
    width = a / 2
#    print("width:",width) 
  else:
    area_size = a * b * fill_rate
    width = area_size / b * 2
    height = b
  result_radian = math.atan(height/width)
  result = result_radian / math.pi * 180
  return result

print(main())

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import math
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
INF = 10**15

a, b, x = [int(item) for item in input().split()]
s = x / a
if s >= a * b / 2:
    hgt = (a * b - s) * 2 / a
    ans = math.atan2(hgt, a) / math.pi * 180.0
    print(ans)
else:
    hgt = s*2 / b
    ans = (0.5 * math.pi - math.atan2(hgt, b)) / math.pi * 180.0
    print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

if a*a*b/2 > x:
    c = 2*x/a/b
    q = atan(b/c)
else:
    c = 2*x/(a**2)-b
    q = atan((b-c)/a)
q *= 180/pi
print(q)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

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

Submission status: Accepted

Solution code:
from math import atan, pi

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

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

Submission status: Accepted

Solution code:
import math
a,b,x = [list(map(int, s.split())) for s in open(0)][0]

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(theta)

Submission status: Accepted

Solution code:
import math
a,b,x=map(int,input().split())
if a*a*b>=x*2:
    c=2*x/(a*b)
    d=c**2+b**2
    d=d**(1/2)
    ans=math.acos(c/d)
    print(ans*180/3.1415926535)
else:
    x=a*a*b-x
    c=2*x/(a*a)
    d=c**2+a**2
    d=d**(1/2)
    ans=math.acos(a/d)
    print(ans*180/3.1415926535)

Submission status: Accepted

Solution code:
from numpy import arctan, pi

def main():
    a, b, x = map(int, input().split())
    if a * a * b > 2 * x:
        ans = arctan(2*x/(a*b*b))
    elif a * a * b < 2 * x and a * a * b != x:
        ans = arctan(a*a*a/2/(a*a*b-x))
    elif a * a * b < 2 * x:
        print(0)
        exit()
    else:
        ans = arctan(a/b)
    print(90 - ans*180/pi)


if __name__ == '__main__': main()

Submission status: Accepted

Solution code:
import math

a, b, x = [int(_) for _ in 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 / (2 * x))))

Submission status: Accepted

Solution code:
import math
a, b, x = map(int, input().split())
y = a*a*b - x
if y == 0:
  print(0)
  exit()

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

Submission status: Accepted

Solution code:
import math
import random
from operator import itemgetter
import re
import sys
from itertools import accumulate
from collections import defaultdict
from collections import deque
from bisect import bisect_left,bisect
from heapq import heappop,heappush
from fractions import gcd
from copy import deepcopy
input = sys.stdin.readline
a,b,x= map(float,input().split())
if x == a*a*b:
    print(0)
else:
    if x > a*a*b/2:
        left = (x-a*a*b/2)/a
        tei = left*2/a
        left1 = b-tei
        ans = math.atan(a/left1)
        print(90-math.degrees(ans))
    else:
        left = x/a
        tei = left*2/b
        ans = math.atan(b/tei)
        print(math.degrees(ans))

Submission status: Accepted

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

Submission status: Accepted

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


left = 0.0
right = 3.14159265 / 2


for i in range(10000):
    mid = left + (right-left)/2
    if math.tan(mid) < b / a:
        if x <= a*a*b - a*a*a*math.tan(mid)/2:
            left = mid
        else:
            right = mid

    else:
        if x <= a*b*b/2 / math.tan(mid):
            left = mid
        else:
            right = mid
print(mid*180/math.pi)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import deque, defaultdict
import copy
import bisect
sys.setrecursionlimit(10 ** 9)
import math
import heapq
from itertools import product, permutations,combinations
import fractions
from operator import itemgetter


import sys
def input():
	return sys.stdin.readline().strip()

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

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

print(shita)

Submission status: Accepted

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

Submission status: Accepted

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

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

x = math.degrees(math.atan(t))
print(x)

Submission status: Accepted

Solution code:
import math


def solve_d(a, b, x):
    if 2 * x == a * a * b:
        return math.atan(b / a) * 180 / math.pi
    elif 2 * x > a * a * b:
        return math.atan((b - x / (a ** 2)) * 2 / a) * 180 / math.pi
    else:
        return 90 - math.atan((x / (a * b)) * 2 / b) * 180 / math.pi


def main():
    # input
    a, b, x = map(int, input().split())
    res = solve_d(a, b, x)
    print(res)


def test():
    assert abs(solve_d(2, 2, 4) - 45.0000000) <= 0.000001
    assert abs(solve_d(12, 21, 10) - 89.7834636934) <= 0.000001
    assert abs(solve_d(3, 1, 8) - 4.2363947991) <= 0.000001


if __name__ == "__main__":
    test()
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import sys
from math import pi, atan

a,b,x = [ int(x) for x in sys.stdin.readline().strip().split() ]
vh = a**2 * b / 2
if x>=vh: th = atan(2*(2*vh-x)/a**3)
else: th = pi / 2. - atan(2*x/a/b**2)
#
print(th*180/pi)

Submission status: Accepted

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

import math


def rad_2_deg(theta):
    return 180.0 * theta / math.pi


def compute_angle(a, b, x):
    capacity = a * a * b
    if x == 0:
        rad_angle = math.pi / 2
    elif x == capacity:
        rad_angle = 0
    elif 2 * x > capacity:
        air_vol = capacity - x
        air_len = air_vol * 2 / a / a
        rad_angle = math.atan2(air_len, a)
    else:
        water_len = x * 2 / a / b
        rad_angle = math.atan2(b, water_len)
    res = rad_2_deg(rad_angle)
    return res


def main():
    a, b, x = (int(z) for z in input().split())
    res = compute_angle(a, b, x)
    print("{:.12f}".format(res))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin
import math

a, b, x = [int(x) for x in stdin.readline().rstrip().split()]

if x == (a ** 2) * b:
    print(0)
    exit()
if 2 * x >= (a ** 2) * b:
    v = (a ** 2) * b - x
    c = (2 * v) / (a ** 2)
    print(90 - math.atan(a / c) * 180 / math.pi)
else:
    c = 2 * x / (a * b)
    print(math.atan(b / c) * 180 / math.pi)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import math

a,b,x=map(int,input().split())
h=x/(a**2)
if(h*2>=b):
    y=(a/2)/math.sqrt((a/2)**2+(b-h)**2)
    ans=math.degrees(math.acos(y))
    print(ans)
else:
    y=(2*a*h/b)/math.sqrt(b**2+(2*a*h/b)**2)
    ans=math.degrees(math.acos(y))
    print(ans)

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan2, degrees

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

area1, area2 = x/a, a*b-x/a
if area1 <= area2:
    y = 2*area1/b
    angle = atan2(b, y)
else:
    y = 2*area2/a
    angle = atan2(y, a)

print(degrees(angle))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import atan, pi

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

x /= a

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

Submission status: Accepted

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

import math

def vol(theta):
    V0 = a*a*b
    if a*math.tan(theta) <= b:
        return V0 - a*a*a*math.tan(theta)/2
    return a*b*b*math.tan(math.pi/2-theta)/2

r = math.pi/2
l = 0.

Vr = vol(r)
Vl = vol(l)
while abs(Vr-Vl)>1e-9:
    t = (r+l)/2
    Vt = vol(t)
    if Vt>x:
        l = t
        Vl = Vt
    else:
        r = t
        Vr = Vt
print(math.degrees(r))

Submission status: Accepted

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

import math

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#gcdは3.4.3だとfractionsにある
from fractions import gcd
import math

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    a,b,xtmp = mi()
    x = xtmp/a
    s = a*b
    if x>s/2:
        nx = s-x
        nb = nx*2/a
        ans = math.degrees(math.atan(nb/a))
        
    else:
        na = 2*x/b
        ans = 90-math.degrees(math.atan(na/b))



    print(ans)

main()

Submission status: Accepted

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

Submission status: Accepted

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


def solve(a: int, b: int, x: int):
    r = 1/2 * a**2 * b
    if x >= r:
        if a**2*b-x != 0:
            tan = a**3/(2*(a**2*b-x))
        else:
            print(0)
            return
    else:
        tan = (2*x)/(a*b**2)
    print(90-math.degrees(math.atan(tan)))
    return


# Generated by 1.1.5 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    a = int(next(tokens))  # type: int
    b = int(next(tokens))  # type: int
    x = int(next(tokens))  # type: int
    solve(a, b, x)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b,x=map(int,input().split())
from math import *
if x*2>a*a*b:
    l,r=0,b
    while r-l>10e-12:
        h=(l+r)/2
        if a*a*(h+b)/2<x:
            l=h
        else:
            r=h
    h=(l+r)/2
    print(degrees(atan((b-h)/a)))
else:
    l,r=0,a
    while r-l>10e-12:
        h=(l+r)/2
        if a*h*b/2<x:
            l=h
        else:
            r=h
    h=(l+r)/2
    print(degrees(atan(b/h)))

Submission status: Accepted

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

c=2*x/(a*b)
if c<=a:
    print(np.arctan(b/c)*180/np.pi)
else:
    b1=2*b-2*x/a**2
    print(np.arctan(b1/a)*180/np.pi)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

def read_values():
    return map(int, input().split())


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


def f():
    a, b, x = read_values()
    if x <= a * a * b / 2:
        t = 2 * x / (a * b * b)
        print(90 - math.degrees(math.atan(t)))
    else:
        t = 2 * (a * a * b - x) / a ** 3
        print(math.degrees(math.atan(t)))

if __name__ == '__main__':
    f()

Submission status: Accepted

Solution code:
import math

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

ans = 0
if x * 2 <= x_max:
  c = ((x * 2) / b) / a
  ans = math.acos(b / ((c ** 2 + b ** 2) ** 0.5))
else:
  c = ((x_max - x) * 2) / a / a
  ans = math.acos(c / ((c ** 2 + a ** 2) ** 0.5))
print(90 - math.degrees(ans))

Submission status: Accepted

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

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

import math
print(math.atan(tangent) * (180 / math.pi))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))

#################

a,b,x = II()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


def calc_deg(a, b, x):
    if x * 2 > a * a * b:
        tmp = 2 * (a * a * b - x) / a / a / a
        ans = math.atan(tmp)
        ans = math.degrees(ans)
    else:
        tmp = a * b * b / x * 0.5
        ans = math.atan(tmp)
        ans = math.degrees(ans)
    return ans


print(calc_deg(a, b, x))

Submission status: Accepted

Solution code:
#import numpy as np
#from numpy import*
#from scipy.sparse.csgraph import shortest_path #shortest_path(csgraph=graph) # dijkstra# floyd_warshall
#from scipy.sparse import csr_matrix
 
from collections import* #defaultdict Counter deque appendleft
from fractions import gcd
from functools import* #reduce
from itertools import* #permutations("AB",repeat=2) combinations("AB",2) product("AB",2) groupby accumulate
from operator import mul,itemgetter
from bisect import* #bisect_left bisect_right
from heapq import* #heapify heappop heappushpop
import math
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)
#input=sys.stdin.readline  #危険！基本オフにしろ！
 
def main():
    a,b,c=map(int,input().split())
    mototaiseki=a**2*b
    amaritakasa=((mototaiseki-c)*2)/a**2
    if amaritakasa>b:
        hidarisita=c*2/(a*b)
        konotokinotan=math.degrees(math.atan(b/hidarisita))
        print(konotokinotan)
    else:
        t=amaritakasa/a
        #print(amaritakasa)
        print(math.degrees(math.atan(t)))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()
# template


def main():
    a, b, x = mfi()
    if x > a * a * b / 2:
        tt = (a * a * b - x) / (a * a) * 2
        # print(tt)
        print(math.degrees(math.atan(tt / a)))
    else:
        tt = (x) / (a * b) * 2
        # print(tt)
        print(math.degrees(math.atan(b / tt)))
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import math

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

x = x/a

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

else:
    ans = math.atan(b*b/2/x)
    ans = math.degrees(ans)

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, atan2, degrees
from operator import mul
from functools import reduce
sys.setrecursionlimit(10**8)

INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007


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

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 * (a * a * b - x) / (a * a)
    print("{:.9f}".format(degrees(atan2(c, a))))
else:
    c = 2 * x / (a * b)
    print("{:.9f}".format(degrees(atan2(b, c))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math


a, b, x = map(int, input().split())
#めっちゃ傾かせる
if (a*a*b) / 2 > x:
    ok = math.degrees(math.atan(b/a))
    ng = 90.0
    cnt = 0
    while True:
        cnt += 1
        mid = (ok + ng) / 2
        if (b / math.tan(math.radians(mid)))*a*b / 2 > x:
            ok = mid
        else:
            ng = mid
        if cnt >= 10000:
            break
    print(ok)
#そんなに傾かせない
else:
    ok = math.degrees(math.atan(b/a))
    ng = 0
    cnt = 0
    while True:
        cnt += 1
        mid = (ok + ng) / 2
        if a*a*b - a*a*a*math.tan(math.radians(mid)) / 2 < x:
            ok = mid
        else:
            ng = mid
        if cnt >= 10000:
            break
    print(ok)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(100000)
def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))

def solve():

    return

def main():
    a,b,x = getList()
    kara = (a*a*b) - x
    if kara <= x:
        maxb = (kara * 2 / a) / a
        theta = math.atan(maxb/a)
        # print(maxb, kara)
        print(math.degrees(theta))
        # print(math.atan(1))
    else:
        theta = math.atan((a*b*b)/(2*x))
        print(math.degrees(theta))



if __name__ =="__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

nums = [int(i) for i in input().split()]
a = nums[0]
b = nums[1]
x = nums[2]
h = x/(a**2)

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

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

Submission status: Accepted

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

import math

def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    a, b, x = rli()
    h = x / (a*a)
    if h >= b/2:
        d1 = 2*(b-h)
        d2 = a
        print(math.degrees(math.atan2(d1, d2)))
    else:
        d1 = b
        d2 = 2*a*h/b
        print(math.degrees(math.atan2(d1, d2)))



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from math import atan, degrees

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

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

Submission status: Accepted

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

Submission status: Accepted

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