結果
| 問題 |
No.1271 初めての級数
|
| コンテスト | |
| ユーザー |
forest3
|
| 提出日時 | 2020-11-13 13:15:49 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 216 bytes |
| コンパイル時間 | 1,619 ms |
| コンパイル使用メモリ | 166,144 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-22 19:59:50 |
| 合計ジャッジ時間 | 2,258 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 1 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int k;
cin >> k;
double ans = 0;
for( int i = 1; i <= k; i++ ) {
ans += 1.0 / i;
}
ans /= k;
cout << fixed << setprecision(12) << ans << endl;
}
forest3