結果
| 問題 |
No.454 逆2乗和
|
| コンテスト | |
| ユーザー |
femto
|
| 提出日時 | 2016-12-06 04:19:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| コード長 | 358 bytes |
| コンパイル時間 | 1,378 ms |
| コンパイル使用メモリ | 166,156 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-30 02:57:15 |
| 合計ジャッジ時間 | 4,356 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 31 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
const ld PI = acos(-1);
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
ld x;
cin >> x;
ld ans = PI * PI / 6;
for(int i = 1; i < 10000000; i++) {
ans += -1.0 / i / i + 1.0 / (x + i) / (x + i);
}
cout << fixed << setprecision(15) << ans << endl;
}
femto