stablegradients/pie-gem5-pairs huggingface dataset:
// Slower C++ solution:
#include<bits/stdc++.h>

#define rep(i,a,b) for(int i=a;i<=b;i++)

#define per(i,a,b) for(int i=a;i>=b;i--)

#define gpf(...) fprintf(stderr,__VA_ARGS__)

using namespace std;

typedef long long ll;

const ll md = 1e9 + 7;

const int N = 1000000;

ll n, m, k;

ll fac[N], inv[N], m3[N];



ll fm(ll x, ll y){

	ll res = 1;

	while (y){

		if (y & 1) res = (res * x) % md;

		y /= 2;

		x = (x * x) % md;

	}

	return res;

}



ll C(int x, int y){

	if (y < 0) return 0;

	if (x < y) return 0;

	ll res = ((fac[x] * inv[x - y]) % md * inv[y]) % md;

	return res;

}



int main(){

	scanf("%lld%lld%lld", &n, &m, &k);

	fac[0] = 1;

	rep(i, 1, n + m + k) fac[i] = (fac[i - 1] * i) % md;

	rep(i, 1, n + m + k) inv[i] = fm(fac[i], md - 2);

	m3[0] = 1;

	rep(i, 1, n + m + k) m3[i] = (m3[i - 1] * 3) % md;

	inv[0] = 1;

	ll ans = 0;

	ll t = 1;

	rep(i, 0, m + k){

		ll tt = C(n + i - 1, n - 1) * t % md;

		tt = tt * m3[m + k - i] % md;

		ans = (ans + tt) % md;

		t = ((t * 2 + md - C(i, m)) % md + md - C(i, i - k)) % md;

	}

	printf("%lld\n", ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.2653581877382472x):
#include<bits/stdc++.h>

using namespace std;

#define N 1000010

#define ll long long



const ll p = 1e9 + 7;

ll n, m, k, ans;

ll fac[N], inv[N], san[N];



ll fpow(ll a, ll b)

{

    ll ans = 1;

    while(b)

    {

        if(b & 1) ans = ans * a % p;

        a = a * a % p; b >>= 1;

    }

    return ans;

}



ll C(ll n, ll m)

{

    if(n < m || n < 0 || m < 0) return 0;

    return fac[n] * inv[m] % p * inv[n - m] % p;

}



int main()

{

    scanf("%lld%lld%lld", &n, &m, &k);

    ll t = n + m + k;

    fac[0] = inv[0] = san[0] = 1;

    for(int i = 1; i <= t; i ++)

    {

        fac[i] = fac[i - 1] * i % p;

        san[i] = san[i - 1] * 3 % p;

    }

    //for(int i = 1; i <= 5; i ++) printf("%lld %lld %lld", fac[i], inv[i], san[i]), system("pause");

    inv[t] = fpow(fac[t], p - 2);

    for(int i = t - 1; i; i --) inv[i] = inv[i + 1] * (i + 1) % p;

    ll t1 = 0, t2 = 1;

    for(int i = 0; i <= m + k; i ++)

    {

        t = C(n + i - 1, n - 1) * san[m + k - i] % p;

        //printf("%lld", t); system("pause");

        t = t * (t2 - t1 + p) % p;

        t2 = (t2 * 2 % p - C(i, m) + p) % p;

        t1 = ((t1 * 2 % p - C(i, i - k - 1) + p) % p + C(i + 1, i - k)) % p;

        ans = (ans + t) % p; 

        //printf("%lld %lld", ans, t); system("pause");

    }

    printf("%lld", ans);

    return 0;

}
// Slower C++ solution:
#include<iostream>

using namespace std;

const long long mod=1e9+7;

long long jc[6060606],_jc[6060606];

long long pow(long long n,long long k)

{

	long long ret=1;

	while(k>0)

	{

		if(k&1)

			ret=ret*n%mod;

		n=n*n%mod;

		k/=2;

	}

	return ret;

}

long long C(int n,int m)

{

	return jc[n]*_jc[m]%mod*_jc[n-m]%mod;

}

int main()

{

	int n,m,k;

	cin>>n>>m>>k;

	jc[0]=1;

	_jc[0]=1;

	for(int i=1;i<=n+m+k;i++)

	{

		jc[i]=jc[i-1]*i%mod;

		_jc[i]=pow(jc[i],mod-2);

	}

	long long tmp=1,ans=0;

	for(int i=0;i<=m+k;i++)

	{

		ans=(ans+C(n+i-1,i)*tmp%mod*pow(3,m+k-i)%mod)%mod;

		tmp*=2;

		if(i+1>k)

			tmp-=C(i,i-k); 

		if(i+1>m)

			tmp-=C(i,m);

		tmp+=2*mod;

		tmp%=mod;

	}

	cout<<ans<<endl;

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.3843825728433996x):
#include<bits/stdc++.h>

using namespace std;

#define N 1000010

#define ll long long



const ll p = 1e9 + 7;

ll n, m, k, ans;

ll fac[N], inv[N], san[N];



ll fpow(ll a, ll b)

{

    ll ans = 1;

    while(b)

    {

        if(b & 1) ans = ans * a % p;

        a = a * a % p; b >>= 1;

    }

    return ans;

}



ll C(ll n, ll m)

{

    if(n < m || n < 0 || m < 0) return 0;

    return fac[n] * inv[m] % p * inv[n - m] % p;

}



int main()

{

    scanf("%lld%lld%lld", &n, &m, &k);

    ll t = n + m + k;

    fac[0] = inv[0] = san[0] = 1;

    for(int i = 1; i <= t; i ++)

    {

        fac[i] = fac[i - 1] * i % p;

        san[i] = san[i - 1] * 3 % p;

    }

    //for(int i = 1; i <= 5; i ++) printf("%lld %lld %lld", fac[i], inv[i], san[i]), system("pause");

    inv[t] = fpow(fac[t], p - 2);

    for(int i = t - 1; i; i --) inv[i] = inv[i + 1] * (i + 1) % p;

    ll t1 = 0, t2 = 1;

    for(int i = 0; i <= m + k; i ++)

    {

        t = C(n + i - 1, n - 1) * san[m + k - i] % p;

        //printf("%lld", t); system("pause");

        t = t * (t2 - t1 + p) % p;

        t2 = (t2 * 2 % p - C(i, m) + p) % p;

        t1 = ((t1 * 2 % p - C(i, i - k - 1) + p) % p + C(i + 1, i - k)) % p;

        ans = (ans + t) % p; 

        //printf("%lld %lld", ans, t); system("pause");

    }

    printf("%lld", ans);

    return 0;

}
// Slower C++ solution:
#include <cstdio>

#include <iostream>

#include <algorithm>

#include <cstring>

#define MOD 1000000007

using namespace std;



int n, m, k;



int quickPow(int n, int m) {

	int res = 1;

	while (m) {

		if (m & 1) res = 1LL * res * n % MOD;

		m >>= 1;

		n = 1LL * n * n % MOD;

	}

	return res;

}



int main() {

	scanf("%d%d%d", &n, &m, &k);

	if (m > k) swap(m, k);

	int ans = quickPow(3, m + k), tmp1 = 1, tmp2 = 1;

	for (int p = n + 1, e, u = 1, v = 1; p <= n + m + k; ++p) {

		e = quickPow(3, n + m + k - p);

		v = 1LL * v * (p - 1) % MOD * quickPow(p - n, MOD - 2) % MOD;

		if (p <= n + m) u = u * 2 % MOD;

		else if (p <= n + k) {

			tmp1 = p - n - 1 == m ? 1 : 1LL * tmp1 * (p - n - 1) % MOD * quickPow(p - n - m - 1, MOD - 2) % MOD;

			u = (2LL * u - tmp1 + MOD) % MOD;

		}

		else {		

			tmp1 = p - n - 1 == m ? 1 : 1LL * tmp1 * (p - n - 1) % MOD * quickPow(p - n - m - 1, MOD - 2) % MOD;

			tmp2 = p == (1 + n + k) ? 1 : 1LL * tmp2 * (p - 1 - n) % MOD * quickPow(p - n - 1 - k, MOD - 2) % MOD;

			u = (2LL * u - tmp1 - tmp2 + MOD + MOD) % MOD;

		}

		ans = (ans + 1LL * e * v % MOD * u % MOD) % MOD;

	}

	printf("%d\n", ans);

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.4870426998214872x):
#include<bits/stdc++.h>

using namespace std;

#define N 1000010

#define ll long long



const ll p = 1e9 + 7;

ll n, m, k, ans;

ll fac[N], inv[N], san[N];



ll fpow(ll a, ll b)

{

    ll ans = 1;

    while(b)

    {

        if(b & 1) ans = ans * a % p;

        a = a * a % p; b >>= 1;

    }

    return ans;

}



ll C(ll n, ll m)

{

    if(n < m || n < 0 || m < 0) return 0;

    return fac[n] * inv[m] % p * inv[n - m] % p;

}



int main()

{

    scanf("%lld%lld%lld", &n, &m, &k);

    ll t = n + m + k;

    fac[0] = inv[0] = san[0] = 1;

    for(int i = 1; i <= t; i ++)

    {

        fac[i] = fac[i - 1] * i % p;

        san[i] = san[i - 1] * 3 % p;

    }

    //for(int i = 1; i <= 5; i ++) printf("%lld %lld %lld", fac[i], inv[i], san[i]), system("pause");

    inv[t] = fpow(fac[t], p - 2);

    for(int i = t - 1; i; i --) inv[i] = inv[i + 1] * (i + 1) % p;

    ll t1 = 0, t2 = 1;

    for(int i = 0; i <= m + k; i ++)

    {

        t = C(n + i - 1, n - 1) * san[m + k - i] % p;

        //printf("%lld", t); system("pause");

        t = t * (t2 - t1 + p) % p;

        t2 = (t2 * 2 % p - C(i, m) + p) % p;

        t1 = ((t1 * 2 % p - C(i, i - k - 1) + p) % p + C(i + 1, i - k)) % p;

        ans = (ans + t) % p; 

        //printf("%lld %lld", ans, t); system("pause");

    }

    printf("%lld", ans);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define rep(i,a,b) for (int i=(a); i<(b); i++)

#define per(i,a,b) for (int i=(b)-1; i>=(a); i--)

#define debug(x) cout << #x << " => " << x << endl

using namespace std;

const int MAX_N = 7 + 300000;

const int MOD = 1e9 + 7;

///----------------------------------------------

int qpow(int a,int b) {

    int ret=1;

    for (; b; b>>=1) {

        if (b&1) ret=1ll*ret*a%MOD;

        a=1ll*a*a%MOD;

    }

    return ret;

}

///----------------------------------------------

int jc[MAX_N*3],jcr[MAX_N*3];

int C(int n,int m) {

    return 1ll*jc[n]*jcr[m]%MOD*jcr[n-m]%MOD;

}

///----------------------------------------------

int fb[MAX_N*3],fc[MAX_N*3];

int main() {



    ///read

    int n1,n2,n3; cin>>n1>>n2>>n3;

    int n=n1+n2+n3;



    ///prework

    jc[0]=1; rep(i,1,n+1) jc[i]=1ll*jc[i-1]*i%MOD;

    rep(i,0,n+1) jcr[i]=qpow(jc[i],MOD-2);

    rep(i,n2+1,n+1) fb[i]=(fb[i-1]+(fb[i-1]+C(i-1,n2))%MOD)%MOD;

    rep(i,n3+1,n+1) fc[i]=(fc[i-1]+(fc[i-1]+C(i-1,n3))%MOD)%MOD;



    ///work

    int ans=0;

    rep(i,n1,n+1) {

        int tmp=((qpow(2,i-n1)+MOD-fb[i-n1])%MOD+MOD-fc[i-n1])%MOD;

        tmp=1ll*tmp*qpow(3,n-i)%MOD;

        ans=(ans+1ll*tmp*C(i-1,n1-1)%MOD)%MOD;

    }

    cout << ans;



}




// Faster C++ solution for the same problem (measured speedup: 1.5320540140046655x):
#include<bits/stdc++.h>

using namespace std;

#define N 1000010

#define ll long long



const ll p = 1e9 + 7;

ll n, m, k, ans;

ll fac[N], inv[N], san[N];



ll fpow(ll a, ll b)

{

    ll ans = 1;

    while(b)

    {

        if(b & 1) ans = ans * a % p;

        a = a * a % p; b >>= 1;

    }

    return ans;

}



ll C(ll n, ll m)

{

    if(n < m || n < 0 || m < 0) return 0;

    return fac[n] * inv[m] % p * inv[n - m] % p;

}



int main()

{

    scanf("%lld%lld%lld", &n, &m, &k);

    ll t = n + m + k;

    fac[0] = inv[0] = san[0] = 1;

    for(int i = 1; i <= t; i ++)

    {

        fac[i] = fac[i - 1] * i % p;

        san[i] = san[i - 1] * 3 % p;

    }

    //for(int i = 1; i <= 5; i ++) printf("%lld %lld %lld", fac[i], inv[i], san[i]), system("pause");

    inv[t] = fpow(fac[t], p - 2);

    for(int i = t - 1; i; i --) inv[i] = inv[i + 1] * (i + 1) % p;

    ll t1 = 0, t2 = 1;

    for(int i = 0; i <= m + k; i ++)

    {

        t = C(n + i - 1, n - 1) * san[m + k - i] % p;

        //printf("%lld", t); system("pause");

        t = t * (t2 - t1 + p) % p;

        t2 = (t2 * 2 % p - C(i, m) + p) % p;

        t1 = ((t1 * 2 % p - C(i, i - k - 1) + p) % p + C(i + 1, i - k)) % p;

        ans = (ans + t) % p; 

        //printf("%lld %lld", ans, t); system("pause");

    }

    printf("%lld", ans);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

#define FOR(i,a,b) for (int i=(a);i<(b);i++)

#define pb push_back



typedef long long ll;

using namespace std;

int MOD (1e9+7);

int powMod(int a, int n, int m){

  ll pro = 1, tmp = a;

  for(; n > 0; n >>= 1){

    if(n & 1) pro = (pro * tmp) % m;

    tmp = tmp * tmp % m;

  }

  if (pro < 0) cout << "pro < 0" << a << "," << n << endl;

  return pro;

}



vector<int> A, R;

int comb(int n, int c){

  return int(ll(A[n + c]) * R[n] % MOD * R[c] % MOD);

}

main(){

  cin.tie(0);

  ios::sync_with_stdio(false);

  int N, M, K;

  cin >> N >> M >> K;



  ll t = 1;

  A.pb(1);

  R.pb(1);

  FOR(i, 1, N + M + K + 1){

    t = t * i % MOD;

    A.pb(t);

    R.pb(powMod(t, MOD - 2, MOD));

  }

  int sum = M + K, p3 = powMod(3, sum, MOD), ret = p3, r3 = powMod(3, MOD - 2, MOD);

  if(M > K) swap(M, K);

  ll pre = 1;



  FOR(i, 1, sum + 1){

    pre *= 2;

    p3 = ll(p3) * r3 % MOD;

    if(i > M){

      pre = pre + MOD - comb(M, i - M - 1);

      if(i > K) pre = pre + MOD - comb(K, i - K - 1);

    }

    pre %= MOD;

    ret += pre * comb(N - 1, i) % MOD * p3 % MOD;

    ret %= MOD;

  }

  cout << ret << endl;

}


// Faster C++ solution for the same problem (measured speedup: 1.980965021834815x):
#include <bits/stdc++.h>

#define FOR(i,a,b) for (int i=(a);i<(b);i++)

#define FORR(i,a,b) for (int i=(a);i>(b);i--)

#define pb push_back



typedef long long ll;

using namespace std;

int MOD = (1e9+7);

const int idxMax = (9e5+1);

int powMod(int a, int n, int m){

  ll pro = 1, tmp = a;

  for(; n > 0; n >>= 1){

    if(n & 1) pro = (pro * tmp) % m;

    tmp = tmp * tmp % m;

  }

  if (pro < 0) cout << "pro < 0" << a << "," << n << endl;

  return pro;

}



int A[idxMax], R[idxMax];

int comb(int n, int c){

  return int(ll(A[n + c]) * R[n] % MOD * R[c] % MOD);

}

main(){

  cin.tie(0);

  ios::sync_with_stdio(false);

  int N, M, K;

  cin >> N >> M >> K;



  ll t = 1;

  A[0] = 1;

  FOR(i, 1, N + M + K + 1){

    t = t * i % MOD;

    A[i] = t;

  }

  t = powMod(t, MOD - 2, MOD);

  R[N + M + K] = t;

  FORR(i, N + K + M, -1){

    R[i] = t;

    t = t * i % MOD;

  }

  int sum = M + K;

  ll pre = 1, p3 = powMod(3, sum, MOD), ret = p3, r3 = powMod(3, MOD - 2, MOD);

  if(M > K) swap(M, K);



  FOR(i, 1, sum + 1){

    pre <<= 1;

    p3 = p3 * r3 % MOD;

    if(i > M){

      pre += MOD - comb(M, i - M - 1);

      if(i > K) pre += MOD - comb(K, i - K - 1);

    }

    pre %= MOD;

    ret += pre * comb(N - 1, i) % MOD * p3 % MOD;

    ret %= MOD;

  }

  cout << ret << endl;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define rep(i,n) for(int i = 0; i < (n);i++)

#define sz(x) int(x.size());

typedef long long ll;

typedef pair<int,int> P;

const long double EPS = 0.0000000001;

const long double PI = acos(-1);

long double a, b, x;



bool ok(long double theta){

  if (theta > PI / 2.0 - EPS) return true;

  long double ret;

  if (a * tan(theta) <= b) {

    ret = a * a * b - a * a * a * tan(theta) / 2.0;

  } else {

    ret = b * b / tan(theta) * a / 2.0;

  }

  return ret < x;

}





int main(){

  

  cin >> a >> b >> x;

  long double l = 0, r = PI / 2.0;

  rep(i,100000){

    long double mid = (r + l) / 2.0; 

    if (ok(mid)) r = mid;

    else l = mid;

  }

 cout << fixed << setprecision(10) << r / PI * 180 << endl;

  

  return 0;

} 

// Faster C++ solution for the same problem (measured speedup: 4.34234773954x):
#include <bits/stdc++.h>

using namespace std;

#define rep(i,n) for(int i = 0; i < (n);i++)

#define sz(x) int(x.size())

typedef long long ll;

typedef pair<int,int> P;



double pi = acos(-1);



int main(){

  double a, b, x;

  cin >> a >> b >> x;



  auto ok = [&](double m) {

    if (a * tan(m) < b) {

      double s = a * b - tan(m) * a * a / 2;

      return s * a <=  x;

    } else {

      double s = b / tan(m) * b / 2;

      return s * a <= x;

    }

  };

  double l = 0; double r = pi / 2;



  rep(i,10000) {

    double m = (l + r) / 2;

    if (ok(m)) r = m;

    else l = m;

  }

  printf("%.12f\n",r * 180 / pi); 

  return 0;

}
// Slower C++ solution:
#include<iostream>

#include<string>

#include<iomanip>

#include<cmath>

#include<vector>

#include<algorithm>



using namespace std;



#define int long long

#define endl "\n"



const long long INF = (long long)1e18;

const long long MOD = 1'000'000'007; 



string yn(bool f){return f?"Yes":"No";}

string YN(bool f){return f?"YES":"NO";}







signed main(){

	cin.tie(nullptr);

	ios::sync_with_stdio(false);

	cout<<fixed<<setprecision(10);

	

	long double a, b, x;

	long double ans, PI = acos(-1);

	long double Z = 0;

	cin>>a>>b>>x;

	// cout<<PI<<endl;

	long double l = 0, h = 90, m;

	

	// cout<<atan(b/a)*180/PI<<endl;

	

	Z  = atan(b/a)*180/PI;

	

	for(int i = 0; i < 200; i++){

		m = (l+h)/2;

		

		long double area, y;

		

		y = tan(m * PI / 180.0) * a;

		

		// cout<<"tam "<<tan(m * PI / 180.0)<<" "<<m*PI/180<<endl;

		

		if(Z < m) {

			area = tan((90-m) * PI / 180) * b * b/ 2;

			

			// cout<<"Z "<<" "<<endl;

		} else {

		

			area = a * (b - y);

		

			area += a * y / 2 ;

		}

		// cout<<"area = "<<area<<" "<<y<<" m = "<<m<<endl;

		

		if(area*a < x){

			h = m;

		} else {

			l = m;

		}

	}

	

	cout<<m<<endl;

	

	

	

	

	return 0;

}

// Faster C++ solution for the same problem (measured speedup: 1.237511091127545x):
#include<iostream>

#include<string>

#include<iomanip>

#include<cmath>

#include<vector>

#include<algorithm>

#include<utility>



using namespace std;



#define int long long

#define endl "\n"



constexpr long long INF = (long long)1e18;

constexpr long long MOD = 1'000'000'007; 



struct fast_io {

	fast_io(){

		std::cin.tie(nullptr);

		std::ios::sync_with_stdio(false);

	};

} fio;



signed main(){

	cout<<fixed<<setprecision(10);

	

	long double pi = acos(-1);

	long double y, ans = 0;

	long double a, b, x;

	

	cin>>a>>b>>x;

	

	y = (a * a * b) / 2;

	

	if(y > x) {

		long double h = (2 * x) / (a * b);

		cout<<90 - (atan(h/b) / pi)  * 180<<endl;

	} else {

		long double z = 2 * (x / (a * a)) - b;

		cout<<90 - (atan(a/(b-z)) / pi) * 180<<endl;

	}

	

	return 0;

}
// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;

typedef  long long ll;

template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}

template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}

//自作関数

template<class T> ll llpow(T x,T n){ll ans=1;while(n--){ans*=x;}return ans;}



#define rep(i,n) for(ll i=0;i<(ll)n;i++)

#define rep2(i, begin_i, end_i) for (ll i = (ll)begin_i; i < (ll)end_i; i++)

    const long double PI = (acos(-1));

    const long double eps=1e-9;



long long INF = 1LL<<60;

void xlfp(double x){printf("%.10lf\n",x);}



long double f(long double a,long double b,long double theta){

if(theta>PI/2-eps){

        return 0.0;

    }

    long double ret;

    if(a*tan(theta)<=b){

        return a*a*b-a*a*a*tan(theta)/2;

    }

    else{

        return b*b/tan(theta)*a/2.0;

    }

}

int main(){

    long double a,b,x;

    cin>>a>>b>>x;

    long double ok=PI/2.0,ng=0;

    for(int i=1;i<=10000;i++){

        long double mid = (ok+ng)/2.0;

        if(f(a,b,mid)<x)ok=mid;

        else ng=mid;

    }

    xlfp(ok/PI*180);

    return 0;

}






// Faster C++ solution for the same problem (measured speedup: 2.000438064017776x):
#include<bits/stdc++.h>

using namespace std;

typedef  long long ll;

template<class T> inline bool chmin(T& a, T b) {if (a > b) {a = b;return true;}return false;}

template<class T> inline bool chmax(T& a, T b) {if (a < b) {a = b;return true;}return false;}

//自作関数

template<class T> ll llpow(T x,T n){ll ans=1;while(n--){ans*=x;}return ans;}



#define rep(i,n) for(ll i=0;i<(ll)n;i++)

#define rep2(i, begin_i, end_i) for (ll i = (ll)begin_i; i < (ll)end_i; i++)

    const long double PI = (acos(-1));

    const long double eps=1e-9;



long long INF = 1LL<<60;

void xlfp(double x){printf("%.10lf\n",x);}



long double f(long double a,long double b,long double x){

    if(a*a*b<=2*x){

        return atan(2*(a*a*b-x)/(a*a*a));

    }

    else{

        return PI/2-atan(2*x/(a*b*b));

    }

}

int main(){

    long double a,b,x;

    cin>>a>>b>>x;

    xlfp(f(a,b,x)/PI*180);

    return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



const long double PI = (acos(-1));

const long double EPS = 0.0000000001;



long double a, b, x;



long double f(long double a, long double b, long double theta){

    if(theta > PI/2.0 - EPS) return 0.0;

    long double ret;

    if(a*tan(theta) <= b)

        ret = a*a*b - a*a*a*tan(theta)/2.0;

    else

        ret = b*b/tan(theta)*a/2.0;

    return ret;

}



void solve(){

    long double ok = PI/2.0;

    long double ng = 0.0;

    for(int _ = 1; _ <= 100000; _++){

        long double mid = (ok+ng)/2.0;

        if(f(a, b, mid) < x) ok = mid;

        else ng = mid;

    }

    cout << fixed << setprecision(10) << ok/PI*180 << endl;

}



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);

    cin >> a >> b >> x;

    solve();

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 10.77041657148293x):
#include "bits/stdc++.h"

#define rep(i,n) for(int i = 0; i < (n); ++i)

using namespace std;

typedef long long int ll;

typedef pair<int, int> P;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



int main(){

	cin.tie(0);

	ios::sync_with_stdio(false);

	double a, b, x;

	cin >> a >> b >> x;

	double s = x / a;

	double rad;

	if(s >= a*b/2){

		double h = (a*b - s) * 2 / a;

		rad = atan2(h, a);

	}

	else{

		double w = s*2/b;

		rad = atan2(b, w);

	}

	double PI = acos(-1);

	double deg = rad / (2*PI) * 360;

	cout << fixed << setprecision(12) << deg << endl;

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



const long double PI = (acos(-1));

const long double EPS = 0.0000000001;



long double a, b, x;



long double f(long double a, long double b, long double theta){

    if(theta > PI/2.0 - EPS) return 0.0;

    long double ret;

    if(a*tan(theta) <= b)

        ret = a*a*b - a*a*a*tan(theta)/2.0;

    else

        ret = b*b/tan(theta)*a/2.0;

    return ret;

}



void solve(){

    long double ok = PI/2.0;

    long double ng = 0.0;

    for(int _ = 1; _ <= 100000; _++){

        long double mid = (ok+ng)/2.0;

        if(f(a, b, mid) < x) ok = mid;

        else ng = mid;

    }

    cout << fixed << setprecision(10) << ok/PI*180 << endl;

}



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);

    cin >> a >> b >> x;

    solve();

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 10.770505722202069x):
#include "bits/stdc++.h"

#define rep(i,n) for(int i = 0; i < (n); ++i)

using namespace std;

using ll = long long;

using P = pair<int, int>;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



const double PI = acos(-1);



int main(){

	cin.tie(0);

	ios::sync_with_stdio(false);

    double a, b, x;

    cin >> a >> b >> x;

    x /= a;

    double rad;

    if(x <= a*b/2) rad = atan2(b*b,2*x);

    else rad = atan2(2*(a*b-x), a*a);

    double ans = rad / (2*PI) * 360;

    cout << fixed << setprecision(12) << ans << endl;

	return 0;

}
// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;



const long double PI = (acos(-1));

const long double EPS = 0.0000000001;



long double a, b, x;



long double f(long double a, long double b, long double theta){

    if(theta > PI/2.0 - EPS) return 0.0;

    long double ret;

    if(a*tan(theta) <= b)

        ret = a*a*b - a*a*a*tan(theta)/2.0;

    else

        ret = b*b/tan(theta)*a/2.0;

    return ret;

}



void solve(){

    long double ok = PI/2.0;

    long double ng = 0.0;

    for(int _ = 1; _ <= 100000; _++){

        long double mid = (ok+ng)/2.0;

        if(f(a, b, mid) < x) ok = mid;

        else ng = mid;

    }

    cout << fixed << setprecision(10) << ok/PI*180 << endl;

}



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);

    cin >> a >> b >> x;

    solve();

    return 0;

}

// Faster C++ solution for the same problem (measured speedup: 10.770987837039792x):
#include "bits/stdc++.h"

#define rep(i,n) for(int i = 0; i < (n); ++i)

using namespace std;

typedef long long int ll;

typedef pair<int, int> P;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }

template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }



int main(){

	cin.tie(0);

	ios::sync_with_stdio(false);

	double a, b, x;

	cin >> a >> b >> x;

	x /= a;

	double rad;

	if(x <= a * b / 2) rad = atan2(b * b, 2 * x);

	else rad = atan2(2 * (a * b - x), a * a);

	double ans = rad / (2 * acos(-1)) * 360;

	cout << fixed << setprecision(12) << ans << endl;

	return 0;

}