結果

問題 No.948 Bomb vs Dush
ユーザー nanophoto12
提出日時 2019-12-11 22:43:15
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 625 bytes
コンパイル時間 1,473 ms
コンパイル使用メモリ 165,984 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 08:05:18
合計ジャッジ時間 2,710 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 38
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

#define M_PI       3.14159265358979323846   // pi

using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> VI;
typedef pair<ll, ll> P;
typedef tuple<ll, ll, ll> t3;

#define rep(a,n) for(int a = 0;a < n;a++)
#define repi(a,b,n) for(int a = b;a < n;a++)

const ull mod = 1000000007;

int main(void)
{
	double r, R;
	cin >> r >> R;
	double theta = asin(r / R);
	double t = M_PI * 2 - theta * 2;
	double area = 4 * R * r * (M_PI / (2*M_PI) * t) + M_PI * r * r;
	cout << std::fixed << std::setprecision(10);
	cout << t << endl;
	cout << area << endl;
	return 0;
}
0