結果
問題 | No.605 板挟みの球面 |
ユーザー |
|
提出日時 | 2023-07-19 00:12:24 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 370 bytes |
コンパイル時間 | 1,441 ms |
コンパイル使用メモリ | 166,672 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-18 23:34:50 |
合計ジャッジ時間 | 1,881 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 1 WA * 3 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(){ ios::sync_with_stdio(false); cin.tie(0); double a, b, ans = 0, cnt = 0; cin >> a >> b; for(double i = a; i <= b; i += 0.000001){ ans += 1 - abs(i); cnt++; } ans *= 4 * M_PI * (b - a) / cnt; cout << fixed << setprecision(15) << ans << '\n'; }