結果

問題 No.605 板挟みの球面
ユーザー pekempey
提出日時 2017-12-05 00:06:14
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 314 bytes
コンパイル時間 593 ms
コンパイル使用メモリ 71,992 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-28 05:33:24
合計ジャッジ時間 977 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <cmath>

using namespace std;

const double pi = acos(-1);

double f(double x) {
  return pi * (1 - x*x);
}

int main() {
  double a, b;
  cin >> a >> b;

  double ans = (f(a) + 4*f((a + b) / 2) + f(b)) * (b - a) / 2;
  printf("%.20f\n", ans);
}
0