結果
問題 | No.454 逆2乗和 |
ユーザー |
![]() |
提出日時 | 2017-04-18 17:15:07 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 6 ms / 2,000 ms |
コード長 | 348 bytes |
コンパイル時間 | 1,562 ms |
コンパイル使用メモリ | 165,696 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-30 04:21:28 |
合計ジャッジ時間 | 2,706 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 |
ソースコード
#include<bits/stdc++.h>using namespace std;#define rep(i,a,b) for(int i=a;i<b;i++)//-----------------------------------------------------------------------------------int main() {double x; cin >> x;double ans = 0;rep(i, 1, 1010101) ans += 1.0 / (x + i) / (x + i);ans += 1.0 / (x + 1010101);printf("%.20f\n", ans);}