結果
| 問題 | No.454 逆2乗和 |
| コンテスト | |
| ユーザー |
🐬hec
|
| 提出日時 | 2016-12-06 12:38:50 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 1,475 ms |
| コンパイル使用メモリ | 165,968 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-28 01:57:55 |
| 合計ジャッジ時間 | 4,465 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using R=long double;
int main(void){
R x;
cin >> x;
R ans=0.0;
const int limit=10000000.0;
R cur=x+limit;
while(cur>x){
ans+=1.0/cur/cur;
cur-=1.0;
}
R offset=0.0;
cur=limit;
while(cur>=1.0){
offset+=1.0/cur/cur;
cur-=1.0;
}
ans+=acos(-1.0)*acos(-1.0)/6.0-offset;
cout.precision(20);
cout << fixed << ans << endl;
return 0;
}
🐬hec