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: Runtime Error

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

import math

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

Submission status: Runtime Error

Solution code:
import sys
import math

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

if a*a*b/2 <= x:
	T=a*(b-(x/(a*a)))
	c=2*T/a 
	d = math.atan2(c, a)
	d_deg=math.degrees(d)
else:
	e=2*X/(a*b)
	d = math.atan2(e, b)
	d_deg=math.degrees(d)
	
#print(d)
print(d_deg)

Submission status: Runtime Error

Solution code:
import math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l1 = x*2 / suf2
    x = b/l1
    ans = math.degrees(math.atan(x))
else:
    l2 = (vol-x)*2 / (a*a)
    x = l/a2
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))

Submission status: Runtime Error

Solution code:
mport math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l = x*2 / suf2
    x = b/l
    ans = math.degrees(math.atan(x))
else:
    l = (vol-x)*2 / (a*a)
    x = l/a
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))

Submission status: Runtime Error

Solution code:
import math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l = x*2 / suf2
    x = b/l
    ans = math.degrees(math.atan(x))
else:
    l = (vol-x)*2 / (a*a)
    x = a/l
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))

Submission status: Runtime Error

Solution code:
import math

a,b,x = (int(num) for num in input().split())
suf2 = a*b
vol = a*a*b
if (vol/2)>=x:
    l = x*2 / suf2
    x = b/l
    ans = math.degrees(math.atan(x))
else:
    l = (vol-x) / (a*a)
    x = a/l
    ans = math.degrees(math.atan(x))
    
print(round(ans,6))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

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

R = math.sqrt(P * P + Q * Q)
cosp = (Q * Q + R * R - P * P) / (2 * Q * R)
print(90 - math.degrees(math.acos(cosp)))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

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


def main():
    from math import degrees, atan

    a, b, x = map(int, input().split())
    h = x / (a ** 2)
    y = 2 * h * a / b
    z = 2 * b - 2 * h

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


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
import math

a, b, x = map(int, input().split())
ans = 0
if a*a*b > 2*x:
    ans =180.0/np.pi*math.atan((a*b*b)/(2*x))
else:
    ans = 180.0/np.pi*math.atan((2*(a*a*b-x))/a**3)

print(ans)

Submission status: Runtime Error

Solution code:
import sys
import math
from collections import defaultdict, deque
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    return


# B
def B():
    return


# C
def C():
    n = I()
    for i in range(int(n ** 0.5), 0, -1):
        if n % i == 0:
            print(i + n // i - 2)
            return
    return


# D
def D():
    a,b,x=LI()
    if (x <= a**2*b/2):
        print(math.degrees(math.atan(x/a/b/b)))
    else:
        print(math.degrees(math.atan(a**3/(a**2*b-x))))
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    D()
    return


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

Submission status: Runtime Error

Solution code:
import math

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
# D Water_Bottle
import math
a,b,x = map(int,input().split(" "))
x /= a
if (x > a*b/2):
    #水筒の半分の容積より水の容積が大きかった場合
    ha = a/2
    print(90-math.degrees(math.atan(ha/(b-(x/a)))))
else:
    #水の容積が水筒の半分の容積以下だった場合
    c = 2*x/b
    print(90-math.degrees(math.atan(c/b)))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

from math import atan,tan,pi
a,b,x = map(int,read().split())

def max_volume(theta):
    
    theta = theta/180*pi
    if theta<atan(b/a):
 
        area = a*b-a*a*tan(theta)/2
    else:
        area = b*(b/tan(theta))/2
    return area*a

left = 0 
right = 90 
while right - left > 1e-7:
    mid = (left+right)/2
    if max_volume(mid) <= x:
        right = mid
    else:
        left = mid

answer = (left+right)/2
print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def ok(mid,a,b,x_s):
    x = a * math.sin(mid*math.pi/180)/math.sin(math.pi/2 - (mid * math.pi/180))
    s = 0
    if b - x > 0:
        s = (b - x + b)/2 * a
    else:
        x = b * math.sin(math.pi/2 - (mid * math.pi/180))/math.sin(mid*math.pi/180)
        s = 0.5 * x * b
    if s < x_s:
        return -1
    else:
        return 1

def bin_search(a,b,x):
    l = 0.0
    r = 90.0
    while abs(l - r) > 1e-10:
        mid = l + (r - l)/2
        res = ok(mid,a,b,x)
        if res < 0:
            r = mid
        else:
            l = mid
    return r


def toFixed(numObj, digits=0):
    return f"{numObj:.{digits}f}"


print(toFixed(bin_search(a,b,x/a),10))

Submission status: Runtime Error

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

def toFixed(numObj, digits=0):
    return f"{numObj:.{digits}f}"

def ok(mid,a,b,x_s):
    x = a * math.sin(mid*math.pi/180)/math.sin(math.pi/2 - (mid * math.pi/180))
    s = 0
    if b - x > 0:
        s = (b + x)/2 * a
    else:
        x = b * math.sin(math.pi/2 - (mid * math.pi/180))/math.sin(mid*math.pi/180)
        s = 0.5 * x * b
    if s < x_s:
        return -1
    else:
        return 1

def bin_search(a,b,x):
    l = 0.0
    r = 90.0
    while abs(l - r) > 1e-6:
        mid = l + (r - l)/2
        res = ok(mid,a,b,x)
        if res < 0:
            r = mid
        else:
            l = mid
    return r


print(toFixed(bin_search(a,b,x/a),10))

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<algorithm>
#include<vector>
#include<cstdlib>
#include<map>
#include<queue>
#include<stack>
#include<deque>
#include<fstream>
#include<string>
#include<sstream>
#include<iomanip>
#include<numeric>
#include<cctype>
#include<random>
using namespace std;

//fixed << setprecision(10)
#define PI 3.141592653589793
#define Yes(a) a ? "Yes" : "No";
#define YES(a) a ? "YES" : "NO";
#define rep(i,n) for(int i=0;i<n;i++)

int gcd(int a,int b) {
	if (a < b) {
		int tmp = a;
		a = b;
		b = tmp;
	}
	int r = a % b;
	while (r != 0) {
		a = b;
		b = r;
		r = a % b;
	}
	return b;
}

map<int, int> prime;
void Prime(long long int n) {
	for (int i = 2; i <= n; i++) {
		int count = 0;
		while (n % i == 0) {
			count++;
			n /= i;
		}
		if (count != 0) {
			prime.insert(make_pair(i, count));
		}
	}
}

int main() {
	double  a, b, x;
	double s;
	cin >> a >> b >> x;
	double ans;
	double t;

	if (2 * x >= a* a* b) {
		s = 2.0 * (a * a * b - x) / a;
		t = s / (a * a);
	}
	else {
		s = x / a;
		t = (b * b) / s;
		t /= 2.0;
	}
	ans = atan(t) * 180.0 / PI;
	cout << fixed << setprecision(10);
	cout << ans << endl;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from math import atan, degrees

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

D = a**2 * b / 2
S = x/a

if x < D:
  Z = a - 2*S/b
  rad = atan((a-Z) / b)
  deg = degrees(rad)
  
elif x > D:
  Y = 2*S/a - b
  rad = atan(a / (b-Y))
  deg = degrees(rad)
  
else:
  rad = atan(a / b)
  deg = degrees(rad)

print(90-deg)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from math import atan, degrees

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

D = 1/2 * a**2 * b
S = x/a

if x < D:
  Z = a - 2*S/b
  rad = atan((a-Z) / b)
  deg = degrees(rad)
  
elif x > D:
  Y = 2*S/a - b
  rad = atan(a / (b-Y))
  deg = degrees(rad)
  
elif x == D:
  rad = atan(a / b)
  deg = degrees(rad)

print(90-deg)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

taiseki = a**2*b

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

Submission status: Runtime Error

Solution code:
import math

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

answer = 0

if (x / a**2) <= (b/2):
  n = (2*x) / (a*b)
  answer = math.degrees(math.atan(b/n))
elif a == 1 and b == 1 and x == 1:
  answer = 0
else:
  n = ((2*x) / a**2) - b
  answer = 90 - math.degrees(math.atan(a / (b-n) ))

print(answer)

Submission status: Runtime Error

Solution code:
import math

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

answer = 0

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

print(answer)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a,b,x = map(int,input().split())
if x >= 1/2 * (a*a*b):
    theta = arctan(2(a*a*b-x)/(a*a*a))
else:
    theta = 90 - arctan(2x/(a*b*b))
print(theta)

Submission status: Runtime Error

Solution code:
import math

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

if x<=a^2*b/2:
  y=x/a*2/b
  print(math.atan(b/y))
else:
  z=b*2-2*x/(a^2)
  print(math.atan(z/a))

Submission status: Runtime Error

Solution code:
import math

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

if x<=a^2*b/2
  y=x/a*2/b
  print(math.atan(b/y))
else:
  z=b*2-2x/a^2
  print(math.atan(z/a))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math

a,b,volume=map(int,input().split())
V=a*a*b
space=V-volume
if space>volume:
  high=x/a/b
  print(math.degree(math.atan(b/high)))
elif space<=volume:
  high2=space/a/a
  print(math.degree(math.atan(high2/a)))

Submission status: Runtime Error

Solution code:
import math

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

v = (a * a * b)/2

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if a>b:
  t = float((2*x)/(a*b*b))
  rad = float(math.atan(t))
  deg = float(math.degrees(rad))
  print(deg)
else:
  t = float((a*a*a)/(2*a*a*b-2*x))
  rad = float(math.atan(t))
  deg = float(math.degrees(rad))
  print(deg)

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if h >= b/2:
    tanth = a / (b - h) / 2
else:
    tanth = 2 * a * h / b**2

theta = math.degrees(math.atan(tanth))
print(90 - theta)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int,input().split())
V = (a**2)*b
v = V*0.5
if x > v:
    U = V - x
    c = U / (a**3)
    z = math.atan(c)
    print(z)
elif x = v:
    z = math.atan(1)
    print(z)
else:
    c = (a*(b**2)) / x
    z = math.atan(c)
    print(z)

Submission status: Runtime Error

Solution code:
import math

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

bootle_volume = a * a * b
half_bootle_volume = 0.5 * bootle_volume

res = 0
if half_bootle_volume == x:
    res = math.degrees(math.atan(1))
elif half_bootle_volume > x:
    y = a - ((2 * x) / (a * b))
    degree = math.degrees(math.atan((a - y) / b))
    res = 90 - degree
elif half_bootle_volume < x:
    if b == y:
        res == 0
    else:
        y = ((2 * x) / (a ** 2)) - b
        degree = math.degrees(math.atan(a / (b - y)))
        res = 90 - degree

print(res)

Submission status: Runtime Error

Solution code:
import math

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

bootle_volume = a * a * b
half_bootle_volume = 0.5 * bootle_volume

res = 0
if half_bootle_volume == x:
    res = math.degrees(math.atan(1))
elif half_bootle_volume > x:
    y = a - ((2 * x) / (a * b))
    degree = math.degrees(math.atan((a - y) / b))
    res = 90 - degree
elif half_bootle_volume < x:
    if x == 0:
        res == 90
    else:
        y = ((2 * x) / (a ** 2)) - b
        degree = math.degrees(math.atan(a / (b - y)))
        res = 90 - degree

print(res)

Submission status: Runtime Error

Solution code:
import math

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

bootle_volume = a * a * b
half_bootle_volume = 0.5 * bootle_volume

res = 0
if half_bootle_volume == x:
    res = math.degrees(math.atan(1))
elif half_bootle_volume > x:
    if x == a * a * b:
        res = 0
    else:
        y = a - ((2 * x) / (a * b))
        degree = math.degrees(math.atan((a - y) / b))
        res = 90 - degree
elif half_bootle_volume < x:
    y = ((2 * x) / (a ** 2)) - b
    degree = math.degrees(math.atan(a / (b - y)))
    res = 90 - degree

print(res)

Submission status: Runtime Error

Solution code:
import math

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

bootle_volume = a * a * b
half_bootle_volume = 0.5 * bootle_volume

res = 0
if half_bootle_volume == x:
    res = math.degrees(math.atan(1))
elif half_bootle_volume > x:
    y = a - ((2 * x) / (a * b))
    degree = math.degrees(math.atan((a - y) / b))
    res = 90 - degree
elif half_bootle_volume < x:
    y = ((2 * x) / (a ** 2)) - b
    degree = math.degrees(math.atan(a / (b - y)))
    res = 90 - degree
elif x == a*a*b: print('0')

print(res)

Submission status: Runtime Error

Solution code:
import math

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

bootle_volume = a * a * b
half_bootle_volume = 0.5 * bootle_volume

res = 0
if half_bootle_volume == x:
    res = math.degrees(math.atan(1))
elif half_bootle_volume > x:
    y = a - ((2 * x) / (a * b))
    degree = math.degrees(math.atan((a - y) / b))
    res = 90 - degree
elif half_bootle_volume < x:
    y = ((2 * x) / (a ** 2)) - b
    degree = math.degrees(math.atan(a / (b - y)))
    res = 90 - degree

print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

if x < a*a*b/2:
    tan = 2*x / (a*b*b)
else:
    i = a**3
    j = 2*(a*a*b-x)
    tan = i/j

deg = math.degrees(math.atan(tan))
print(90-deg)

Submission status: Runtime Error

Solution code:
import math
a, b, x = map(int, input().split())
i = a**3
j = 2*(a*a*b-x)
tan1 = i/j
deg = math.degrees(math.atan(tan1))
if x < a*a*b/2:
    tan2 = 2*x / (a*b*b)
    deg = math.degrees(math.atan(tan2))

print(90-deg)

Submission status: Runtime Error

Solution code:
mport math
a, b, x = map(int, input().split())
i = a**3
j = 2*(a*a*b-x)
tan1 = i/j
deg = math.degrees(math.atan(tan1))
if x < a*a*b/2:
    tan2 = 2*x / (a*b*b)
    deg = math.degrees(math.atan(tan2))

print(90-deg)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int, input().split())
def f(a,b,t):
  if t < math.atan(a/b): return a*a*b - a*a*a*math.tan(t)/2
  elif t > math.atan(a/b): return a*b*b*math.tan(math.pi/2-t)/2
  else: return a*a*b/2
  
err = x-f(a,b,math.atan(a/b))
if abs(err) < 1e-6:
  print(math.degrees(math.atan(a/b)))
else:
  if err > 0:
    ths = [(math.atan(a/b) - 0)*i/3 for i in range(4)]
  else:
    ths = [(math.pi/2-math.atan(a/b))*i/3+math.atan(a/b) for i in range(4)]

  abs_err = map(abs,[x-f(a,b,th) for th in ths])
  eps = 1e-6
  while min(abs_err) > eps:
    err = [x-f(a,b,th) for th in ths]
    abs_err = list(map(abs,err))
    n_i = err.index(max([e for e in err if e<0]))
    p_i = n_i+1
    ths = [(ths[p_i]-ths[n_i])*i/3+ths[n_i] for i in range(4)]

  print(math.degrees(ths[abs_err.index(min(abs_err))]))

Submission status: Runtime Error

Solution code:
import math
a,b,x = map(int, input().split())
def f(a,b,t):
  if t < math.atan(a/b): return a*a*b - a*a*a*math.tan(t)/2
  elif t > math.atan(a/b): return a*b*b*math.tan(math.pi/2-t)/2
  else: return a*a*b/2
  
err = x-f(a,b,math.atan(a/b))
if abs(err) < 1e-6:
  print(math.atan(a/b))
else:
  if err < 0:
    ths = [(math.atan(a/b) - 0)*i/3 for i in range(4)]
  else:
    ths = [(math.pi/2-math.atan(a/b))*i/3 for i in range(4)]

  abs_err = map(abs,[x-f(a,b,th) for th in ths])
  eps = 1e-6
  while min(abs_err) > eps:
    err = [x-f(a,b,th) for th in ths]
    abs_err = list(map(abs,err))
    n_i = err.index(max([e for e in err if e<0]))
    p_i = n_i+1
    ths = [(ths[p_i]-ths[n_i])*i/3+ths[n_i] for i in range(4)]
  print(math.degrees(ths[abs_err.index(min(abs_err))]))

Submission status: Runtime Error

Solution code:
import math

a , b , x = map(int,input().split())
if  x <= a*a*b/2:
    h = 2*x / (b*a)
    theta = math.degrees(math.atan(h/b))
else:
    upper=(2*x / (a*a)) - b
    if b = upper:
        theta = 90
    else:
        theta = math.degrees(math.atan(a / (b - upper)))

print(90-theta)

Submission status: Runtime Error

Solution code:
import math

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

print(90-theta)

Submission status: Runtime Error

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

if x > capacity/2:
  nokori = capacity - x
  teihen =  nokori / a * 2 / a
  tan = a / teihen
  degree = math.atan(tan)
  ans = 90 - math.degrees(degree)
else:
  teihen =  x / a * 2 / b
  tan = b / teihen
  degree = math.atan(tan)
  ans = math.degrees(degree)

print(ans)

Submission status: Runtime Error

Solution code:
a, b, x = map(int, input().split())
h = x/b/b
t = (a - h)*b
xx = t/b/0.5

import math
print(math.degrees(math.atan(b/xx)))

Submission status: Runtime Error

Solution code:
// D - Water Bottle
#include <bits/stdc++.h>
using namespace std;
using dbl = double;
#define PI (M_PI)
#define DEG(rad) ((rad)*180/PI)
#define EPS (0.000000001) // 誤差範囲

dbl f(dbl a, dbl b, dbl rad){//rad 傾けたとき a*a*b の容器にあふれずに入れられる水の量は？
	if(PI/2 - rad < EPS) return 0.0;//誤差範囲で90°といえるなら0を返す
	dbl c = tan(rad);//rad 傾けてみる
	//入れられる水の量: b/a(45°)以下？ yes:容器の体積-空き容量(横から見て、奥行き*△) no:奥行き*△
	return c<=b/a? a*a*b - a*(a*(a*c)/2): a*(b*(b/c)/2);
}

dbl solve(dbl a, dbl b, dbl x){
	dbl ok = PI/2;
	dbl ng = 0;
	dbl volume = 0;
	while(abs(x - volume) >= EPS){
		dbl mid = (ok+ng)/2;// mid: この角度でどれだけ水を入れられるか？
		volume = f(a,b,mid);
		if(volume <= x) ok = mid;// 角度を小さくして、もっと多く入るようにする
		else ng = mid;// 角度を大きくして、もっと少なく入るようにする
	}
	return ok;
}

int main(){
	dbl a,b,x; cin>>a>>b>>x;
	printf("%.10f\n", DEG(solve(a, b, x)));
}

Submission status: Runtime Error

Solution code:
n,k=map(int,input().split())
 
a=list(map(int,input().split()))
f=list(map(int,input().split()))
a=sorted(a)
f=sorted(f,reverse=True)
 
l=-1
r=max(a)*max(f)
def ok():
    s=0
    for i in range(n):
        s+=max(0,int(int(a[i])-int(c/f[i])))
    return s<=k
 
while(l+1<r):
    c=int((l+r)/2)
    ok=lambda :
    	s=0
    	for i in range(n):
    	    s+=max(0,int(int(a[i])-int(c/f[i])))
    	return s<=k
    if ok:
        r=c
    else:
        l=c
print(r)

Submission status: Runtime Error

Solution code:
# ABC144d


def main():
    import sys
    import math
    import numpy as np
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

    a, b, x = map(int, input().split())
    if x > a*a*b/2:
        # print(np.rad2deg(np.arctan(2*(a*a*b-x)/(a*a*a))))
        print(math.degrees(math.atan(2*(a*a*b-x)/(a*a*a))))
        exit(0)
    print(math.degrees(math.atan(a*b*b/2/x)))
    # print(np.rad2deg(np.arctan(a*b*b/2/x)))


if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
# ABC144d


def main():
    import sys
    import math
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)

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


if __name__ == '__main__':
    main()