結果
| 問題 |
No.948 Bomb vs Dush
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-11-22 14:14:40 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 351 bytes |
| コンパイル時間 | 1,526 ms |
| コンパイル使用メモリ | 164,496 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-10-11 02:34:39 |
| 合計ジャッジ時間 | 2,895 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
constexpr long double PI = 3.1415926535897932384626433;
int main() {
double r,R;
cin >> r >> R;
double c = (R*R+R*R-4*r*r)/(2*R*R);
double t = 2*PI-acos(c);
double theta = t*180./PI;
double area = PI*((R+r)*(R+r)-(R-r)*(R-r))*theta/360. + PI*r*r;
printf("%.10f\n",t);
printf("%.10f\n",area);
}