結果

問題 No.454 逆2乗和
ユーザー vwxyz
提出日時 2021-08-17 19:36:31
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 264 bytes
コンパイル時間 3,390 ms
コンパイル使用メモリ 267,448 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-10 18:15:47
合計ジャッジ時間 5,323 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;

int main(){
    long double x;cin>>x;
    long double ans=0;
    for(int i=1;i<pow(10,7);i++){
        ans+=1/pow(i+x,2);
    }
    ans+=1/(pow(10,7)+x);
    cout<<setprecision(15)<<ans<<endl;
}
0