結果

問題 No.605 板挟みの球面
ユーザー t98slider
提出日時 2023-07-19 00:16:22
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 365 bytes
コンパイル時間 1,558 ms
コンパイル使用メモリ 165,904 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-18 23:40:05
合計ジャッジ時間 2,110 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#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 * 0.000001;
    cout << fixed << setprecision(15) << ans << '\n';
}
0