結果
問題 | No.1271 初めての級数 |
ユーザー |
|
提出日時 | 2020-11-25 22:23:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 32 ms / 2,000 ms |
コード長 | 221 bytes |
コンパイル時間 | 1,580 ms |
コンパイル使用メモリ | 166,284 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-23 19:27:57 |
合計ジャッジ時間 | 2,637 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; constexpr int kN = int(1E7 + 10); int main() { double ans = 0; int k; scanf("%d", &k); for (int i = 1; i < kN; i++) ans += 1.0 / i / (i + k); printf("%.20lf\n", ans); }