結果
問題 | No.454 逆2乗和 |
ユーザー |
|
提出日時 | 2016-12-05 02:18:35 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 300 bytes |
コンパイル時間 | 458 ms |
コンパイル使用メモリ | 37,888 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-27 20:59:02 |
合計ジャッジ時間 | 1,417 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 1 WA * 30 |
ソースコード
#include <cstdio>#include <cmath>#define repeat_from(i,m,n) for (int i = (m); (i) < (n); ++(i))int main() {long double x; scanf("%Lf", &x);long double y = 0;const int l = 100000;repeat_from (n,1,l) y += powl(x+n, -2);y += 1.0/l;printf("%.12Lf\n", y);return 0;}