結果
| 問題 | 
                            No.948 Bomb vs Dush
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2019-12-11 09:47:46 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 248 bytes | 
| コンパイル時間 | 514 ms | 
| コンパイル使用メモリ | 67,156 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-24 07:35:16 | 
| 合計ジャッジ時間 | 1,620 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 38 | 
ソースコード
#include<iostream>
#include<cmath>
using namespace std;
#define PI (2*acos(0.0))
int main(){
    double r, R;
    cin >> r >> R;
    double t = 2*PI-2*fabs(atan2(r, sqrt(R*R-r*r)));
    cout << t << endl << r*(2*R*t+PI*r) << endl;
    return 0;
}