結果
問題 |
No.454 逆2乗和
|
ユーザー |
![]() |
提出日時 | 2019-07-21 17:19:05 |
言語 | C (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 298 bytes |
コンパイル時間 | 832 ms |
コンパイル使用メモリ | 28,672 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-22 10:58:26 |
合計ジャッジ時間 | 2,527 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 29 WA * 2 |
ソースコード
// yukicoder: No.454 逆2乗和 // 2019.7.21 bal4u #include <stdio.h> #define LIM 200000 int main() { int n; double x, t, ans; scanf("%lf", &x); ans = 1.0/(x+LIM), t = (x+LIM)*(x+LIM); for (n = LIM; n > 1; n--) { t += 1-2*(x+n); ans += 1.0/t; } printf("%.15lf\n", ans); return 0; }