結果

問題 No.1271 初めての級数
ユーザー face4
提出日時 2020-10-31 16:11:46
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 227 bytes
コンパイル時間 617 ms
コンパイル使用メモリ 69,248 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-07-22 05:04:09
合計ジャッジ時間 1,178 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<iomanip>
using namespace std;

int main(){
    int k;
    cin >> k;
    double d = 0;
    for(int i = 1; i <= k; i++) d += 1.0/i;
    cout << fixed << setprecision(12) << d/k << endl;
    return 0;
}
0