結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー Mister
提出日時 2020-04-08 11:17:19
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 4 ms / 5,000 ms
コード長 455 bytes
コンパイル時間 779 ms
コンパイル使用メモリ 72,016 KB
最終ジャッジ日時 2025-01-09 15:08:08
ジャッジサーバーID
(参考情報)
judge4 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <iomanip>

using ldouble = long double;
constexpr ldouble PI = 3.14159265358979L;

void solve() {
    ldouble c, p, q;
    std::cin >> c >> p >> q;

    auto r = (q - p) / 2,
         s = (p + q) / 2;

    std::cout << std::fixed << std::setprecision(10)
              << 2 * PI * s * PI * r * r * c << std::endl;
}

int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);

    solve();

    return 0;
}
0