結果
問題 |
No.454 逆2乗和
|
ユーザー |
|
提出日時 | 2016-12-05 02:18:44 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 301 bytes |
コンパイル時間 | 482 ms |
コンパイル使用メモリ | 37,888 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-30 02:42:15 |
合計ジャッジ時間 | 3,294 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 31 |
ソースコード
#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 = 1000000; repeat_from (n,1,l) y += powl(x+n, -2); y += 1.0/l; printf("%.12Lf\n", y); return 0; }