結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-01-02 14:26:06
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 708 bytes
コンパイル時間 5,674 ms
コンパイル使用メモリ 308,004 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-02 14:26:13
合計ジャッジ時間 6,109 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,676 KB
testcase_01 AC 2 ms
6,676 KB
testcase_02 AC 2 ms
6,676 KB
testcase_03 AC 2 ms
6,676 KB
testcase_04 AC 2 ms
6,676 KB
testcase_05 AC 2 ms
6,676 KB
testcase_06 AC 2 ms
6,676 KB
testcase_07 AC 2 ms
6,676 KB
testcase_08 AC 2 ms
6,676 KB
testcase_09 AC 2 ms
6,676 KB
testcase_10 AC 2 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>


using namespace std;
using namespace atcoder;
#define rep(i,m,n,k) for (int i = (int)(m); i < (int)(n); i += (int)(k))
#define rrep(i,m,n,k) for (int i = (int)(m); i > (int)(n); i += (int)(k))
#define ll long long
#define list(T,A,N) vector<T> A(N);for(int i=0;i<(int)(N);i++){cin >> A[i];}

template <class T>
map<T,ll> Counter(vector<T> A){
    map<T,ll> m;
    for(auto a:A) m[a]++;
    return m;
} 


int main(){
    
    long double C,R,r;
    cin >> C >> r >> R;
    long double pi = 3.14159265358979;
    long double ans;
    ans = C*pi*pi*(r+R)*((R-r)/2)*((R-r)/2);
    
    cout << fixed << setprecision(10);
    cout << ans << endl;
    return 0;
}
0